Commit 69c2f1aefed9809e9f764aa1a3461456440f0330

Authored by alexyang
1 parent a17ea357

ini

Showing 77 changed files with 611 additions and 3987 deletions

Too many changes to show.

To preserve performance only 77 of 400 files are displayed.

titan-api/pom.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2   -<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3   - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4   - <modelVersion>4.0.0</modelVersion>
  2 +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  3 + xmlns="http://maven.apache.org/POM/4.0.0"
  4 + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  5 + <modelVersion>4.0.0</modelVersion>
5 6  
6   -<groupId>com.dili</groupId>
7   - <artifactId>titan-api</artifactId>
8   - <packaging>war</packaging>
9   - <name>titan-api-web</name>
10   -<properties>
11   - <jdk.version>1.7</jdk.version>
12   - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13   - <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
14   - <spring.version>3.2.9.RELEASE</spring.version>
15   - <aspectj.version>1.6.11</aspectj.version>
16   - <jackson.version>1.9.2</jackson.version>
17   - <slf4j.version>1.6.4</slf4j.version>
18   - </properties>
  7 + <groupId>com.dili</groupId>
  8 + <artifactId>titan-api</artifactId>
  9 + <packaging>war</packaging>
  10 + <version>1.0</version>
  11 + <name>titan-api</name>
  12 + <properties>
  13 + <jdk.version>1.7</jdk.version>
  14 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  15 + <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
  16 + <spring.version>3.2.9.RELEASE</spring.version>
  17 + <aspectj.version>1.6.11</aspectj.version>
  18 + <jackson.version>1.9.2</jackson.version>
  19 + <slf4j.version>1.6.4</slf4j.version>
  20 + </properties>
19 21  
20   - <!-- 插件管理 -->
21   - <build>
22   - <finalName>titan-api-web</finalName>
23   - <resources>
24   - <resource>
25   - <directory>${project.basedir}/src/main/resources</directory>
26   - <filtering>true</filtering>
27   - </resource>
28   - </resources>
29   - <pluginManagement>
30   - <plugins>
31   - <plugin>
32   - <!-- war插件 -->
33   - <groupId>org.apache.maven.plugins</groupId>
34   - <artifactId>maven-war-plugin</artifactId>
35   - <version>2.3</version>
36   - </plugin>
37   - <plugin>
38   - <groupId>org.apache.maven.plugins</groupId>
39   - <artifactId>maven-compiler-plugin</artifactId>
40   - <version>2.5.1</version>
41   - <configuration>
42   - <source>1.7</source>
43   - <target>1.7</target>
44   - <encoding>UTF-8</encoding>
45   - </configuration>
46   - </plugin>
47   - <!-- 配置构建时忽略测试用例 -->
48   - <plugin>
49   - <groupId>org.apache.maven.plugins</groupId>
50   - <artifactId>maven-surefire-plugin</artifactId>
51   - <configuration>
52   - <skipTests>true</skipTests>
53   - </configuration>
54   - </plugin>
55   - <plugin>
56   - <groupId>org.mortbay.jetty</groupId>
57   - <artifactId>maven-jetty-plugin</artifactId>
58   - <version>6.1.26</version>
59   - <configuration>
60   - <scanIntervalSeconds>3</scanIntervalSeconds>
61   - <contextPath>/</contextPath>
62   - <connectors>
63   - <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
64   - <port>80</port>
65   - </connector>
66   - </connectors>
67   - </configuration>
68   - </plugin>
69   - <plugin>
70   - <groupId>org.apache.tomcat.maven</groupId>
71   - <artifactId>tomcat7-maven-plugin</artifactId>
72   - <version>2.2</version>
73   - <configuration>
74   - <port>80</port>
75   - <path>/</path>
76   - </configuration>
77   - </plugin>
78   - <plugin>
79   - <artifactId>maven-resources-plugin</artifactId>
80   - <version>2.5</version>
81   - <executions>
82   - <execution>
83   - <id>copy-xmls</id>
84   - <phase>process-sources</phase>
85   - <goals>
86   - <goal>copy-resources</goal>
87   - </goals>
88   - <configuration>
89   - <outputDirectory>${basedir}/target/classes</outputDirectory>
90   - <resources>
91   - <resource>
92   - <directory>${basedir}/src/main/hbase-profiles/${package.env}</directory>
93   - <includes>
94   - <include>**/*.xml</include>
95   - </includes>
96   - </resource>
97   - </resources>
98   - </configuration>
99   - </execution>
100   - </executions>
101   - </plugin>
102   - </plugins>
103   - </pluginManagement>
104   - </build>
  22 + <!-- 插件管理 -->
  23 + <build>
  24 + <finalName>titan-api-web</finalName>
  25 + <resources>
  26 + <resource>
  27 + <directory>${project.basedir}/src/main/resources</directory>
  28 + <filtering>true</filtering>
  29 + </resource>
  30 + </resources>
  31 + <plugins>
  32 + <plugin>
  33 + <!-- war插件 -->
  34 + <groupId>org.apache.maven.plugins</groupId>
  35 + <artifactId>maven-war-plugin</artifactId>
  36 + <version>2.3</version>
  37 + </plugin>
  38 + <plugin>
  39 + <groupId>org.apache.maven.plugins</groupId>
  40 + <artifactId>maven-compiler-plugin</artifactId>
  41 + <version>2.5.1</version>
  42 + <configuration>
  43 + <source>1.7</source>
  44 + <target>1.7</target>
  45 + <encoding>UTF-8</encoding>
  46 + </configuration>
  47 + </plugin>
  48 + <!-- 配置构建时忽略测试用例 -->
  49 + <plugin>
  50 + <groupId>org.apache.maven.plugins</groupId>
  51 + <artifactId>maven-surefire-plugin</artifactId>
  52 + <configuration>
  53 + <skipTests>true</skipTests>
  54 + </configuration>
  55 + </plugin>
  56 + <plugin>
  57 + <groupId>org.apache.tomcat.maven</groupId>
  58 + <artifactId>tomcat7-maven-plugin</artifactId>
  59 + <version>2.2</version>
  60 + <configuration>
  61 + <port>8080</port>
  62 + <path>/</path>
  63 + </configuration>
  64 + </plugin>
  65 + <plugin>
  66 + <artifactId>maven-resources-plugin</artifactId>
  67 + <version>2.5</version>
  68 + <executions>
  69 + <execution>
  70 + <id>copy-xmls</id>
  71 + <phase>process-sources</phase>
  72 + <goals>
  73 + <goal>copy-resources</goal>
  74 + </goals>
  75 + <configuration>
  76 + <outputDirectory>${basedir}/target/classes</outputDirectory>
  77 + <resources>
  78 + <resource>
  79 + <directory>${basedir}/src/main/hbase-profiles/${package.env}</directory>
  80 + <includes>
  81 + <include>**/*.xml</include>
  82 + </includes>
  83 + </resource>
  84 + </resources>
  85 + </configuration>
  86 + </execution>
  87 + </executions>
  88 + </plugin>
  89 + </plugins>
  90 + </build>
105 91  
106   - <dependencies>
107   - <!-- spring -->
108   - <dependency>
109   - <groupId>org.springframework</groupId>
110   - <artifactId>spring-webmvc</artifactId>
111   - <version>${spring.version}</version>
112   - <exclusions>
113   - <exclusion>
114   - <groupId>commons-logging</groupId>
115   - <artifactId>commons-logging</artifactId>
116   - </exclusion>
117   - </exclusions>
118   - </dependency>
119   - <dependency>
120   - <groupId>org.springframework</groupId>
121   - <artifactId>spring-jdbc</artifactId>
122   - <version>${spring.version}</version>
123   - </dependency>
124   - <dependency>
125   - <groupId>org.springframework</groupId>
126   - <artifactId>spring-tx</artifactId>
127   - <version>${spring.version}</version>
128   - </dependency>
129   - <dependency>
130   - <groupId>org.springframework</groupId>
131   - <artifactId>spring-asm</artifactId>
132   - <version>${spring.version}</version>
133   - </dependency>
134   - <dependency>
135   - <groupId>org.springframework</groupId>
136   - <artifactId>spring-context-support</artifactId>
137   - <version>${spring.version}</version>
138   - </dependency>
139   - <dependency>
140   - <groupId>org.springframework</groupId>
141   - <artifactId>spring-expression</artifactId>
142   - <version>${spring.version}</version>
143   - </dependency>
144   - <dependency>
145   - <groupId>org.springframework</groupId>
146   - <artifactId>spring-web</artifactId>
147   - <version>${spring.version}</version>
148   - </dependency>
  92 + <dependencies>
  93 + <!-- spring -->
  94 + <dependency>
  95 + <groupId>org.springframework</groupId>
  96 + <artifactId>spring-webmvc</artifactId>
  97 + <version>${spring.version}</version>
  98 + <exclusions>
  99 + <exclusion>
  100 + <groupId>commons-logging</groupId>
  101 + <artifactId>commons-logging</artifactId>
  102 + </exclusion>
  103 + </exclusions>
  104 + </dependency>
  105 + <dependency>
  106 + <groupId>org.springframework</groupId>
  107 + <artifactId>spring-jdbc</artifactId>
  108 + <version>${spring.version}</version>
  109 + </dependency>
  110 + <dependency>
  111 + <groupId>org.springframework</groupId>
  112 + <artifactId>spring-tx</artifactId>
  113 + <version>${spring.version}</version>
  114 + </dependency>
  115 + <dependency>
  116 + <groupId>org.springframework</groupId>
  117 + <artifactId>spring-context-support</artifactId>
  118 + <version>${spring.version}</version>
  119 + </dependency>
  120 + <dependency>
  121 + <groupId>org.springframework</groupId>
  122 + <artifactId>spring-expression</artifactId>
  123 + <version>${spring.version}</version>
  124 + </dependency>
  125 + <dependency>
  126 + <groupId>org.springframework</groupId>
  127 + <artifactId>spring-web</artifactId>
  128 + <version>${spring.version}</version>
  129 + </dependency>
  130 +
  131 + <!-- LOG4J日志记录 -->
  132 + <dependency>
  133 + <groupId>org.slf4j</groupId>
  134 + <artifactId>slf4j-api</artifactId>
  135 + <version>1.6.4</version>
  136 + </dependency>
  137 + <dependency>
  138 + <groupId>org.slf4j</groupId>
  139 + <artifactId>slf4j-log4j12</artifactId>
  140 + <version>1.6.4</version>
  141 + </dependency>
  142 + <dependency>
  143 + <groupId>log4j</groupId>
  144 + <artifactId>log4j</artifactId>
  145 + <version>1.2.17</version>
  146 + </dependency>
  147 +
  148 + <dependency>
  149 + <groupId>commons-lang</groupId>
  150 + <artifactId>commons-lang</artifactId>
  151 + <version>2.5</version>
  152 + </dependency>
149 153  
150   - <!-- LOG4J日志记录 -->
151   - <dependency>
152   - <groupId>org.slf4j</groupId>
153   - <artifactId>slf4j-api</artifactId>
154   - <version>1.6.4</version>
155   - </dependency>
156   - <dependency>
157   - <groupId>org.slf4j</groupId>
158   - <artifactId>slf4j-log4j12</artifactId>
159   - <version>1.6.4</version>
160   - </dependency>
161   - <dependency>
162   - <groupId>log4j</groupId>
163   - <artifactId>log4j</artifactId>
164   - <version>1.2.17</version>
165   - </dependency>
  154 + <dependency>
  155 + <groupId>commons-codec</groupId>
  156 + <artifactId>commons-codec</artifactId>
  157 + <version>1.2</version>
  158 + </dependency>
  159 + <dependency>
  160 + <groupId>org.mybatis</groupId>
  161 + <artifactId>mybatis</artifactId>
  162 + <version>3.2.1</version>
  163 + </dependency>
  164 + <dependency>
  165 + <groupId>org.mybatis</groupId>
  166 + <artifactId>mybatis-spring</artifactId>
  167 + <version>1.2.0</version>
  168 + </dependency>
  169 + <dependency>
  170 + <groupId>com.alibaba</groupId>
  171 + <artifactId>druid</artifactId>
  172 + <version>1.0.11</version>
  173 + </dependency>
  174 + <dependency>
  175 + <groupId>mysql</groupId>
  176 + <artifactId>mysql-connector-java</artifactId>
  177 + <version>5.1.25</version>
  178 + </dependency>
166 179  
167   - <dependency>
168   - <groupId>commons-lang</groupId>
169   - <artifactId>commons-lang</artifactId>
170   - <version>2.5</version>
171   - </dependency>
  180 + <!-- 工具类 -->
  181 + <!-- google sets,maps -->
  182 + <!--<dependency>-->
  183 + <!--<groupId>com.google.guava</groupId>-->
  184 + <!--<artifactId>guava</artifactId>-->
  185 + <!--<version>14.0.1</version>-->
  186 + <!--</dependency>-->
  187 + <!-- JSON -->
  188 + <dependency>
  189 + <groupId>com.alibaba</groupId>
  190 + <artifactId>fastjson</artifactId>
  191 + <version>1.1.31</version>
  192 + </dependency>
  193 + <dependency>
  194 + <groupId>org.aspectj</groupId>
  195 + <artifactId>aspectjweaver</artifactId>
  196 + <version>1.7.2</version>
  197 + </dependency>
  198 + <!--<dependency>-->
  199 + <!--<groupId>cglib</groupId>-->
  200 + <!--<artifactId>cglib-nodep</artifactId>-->
  201 + <!--<version>2.1_3</version>-->
  202 + <!--</dependency>-->
172 203  
173   - <dependency>
174   - <groupId>commons-codec</groupId>
175   - <artifactId>commons-codec</artifactId>
176   - <version>1.2</version>
177   - </dependency>
178   - <dependency>
179   - <groupId>org.mybatis</groupId>
180   - <artifactId>mybatis</artifactId>
181   - <version>3.2.1</version>
182   - </dependency>
183   - <dependency>
184   - <groupId>org.mybatis</groupId>
185   - <artifactId>mybatis-spring</artifactId>
186   - <version>1.2.0</version>
187   - </dependency>
188   - <dependency>
189   - <groupId>com.alibaba</groupId>
190   - <artifactId>druid</artifactId>
191   - <version>1.0.11</version>
192   - </dependency>
193   - <dependency>
194   - <groupId>mysql</groupId>
195   - <artifactId>mysql-connector-java</artifactId>
196   - <version>5.1.25</version>
197   - </dependency>
  204 + <!-- common logging replacer -->
  205 + <dependency>
  206 + <groupId>org.slf4j</groupId>
  207 + <artifactId>jcl-over-slf4j</artifactId>
  208 + <version>${slf4j.version}</version>
  209 + </dependency>
  210 + <!-- if you enable @AspectJ style AOP in spring. -->
  211 + <dependency>
  212 + <groupId>org.aspectj</groupId>
  213 + <artifactId>aspectjrt</artifactId>
  214 + <version>${aspectj.version}</version>
  215 + </dependency>
  216 + <!-- if you enable JSR303 (Bean Validation) in spring. -->
  217 + <!--<dependency>-->
  218 + <!--<groupId>org.hibernate</groupId>-->
  219 + <!--<artifactId>hibernate-validator</artifactId>-->
  220 + <!--<version>4.2.0.Final</version>-->
  221 + <!--</dependency>-->
  222 + <!-- if you use velocity view in springmvc -->
  223 + <dependency>
  224 + <groupId>org.apache.velocity</groupId>
  225 + <artifactId>velocity</artifactId>
  226 + <version>1.7</version>
  227 + </dependency>
  228 + <!-- if you use velocity layout view in springmvc -->
  229 + <dependency>
  230 + <groupId>org.apache.velocity</groupId>
  231 + <artifactId>velocity-tools</artifactId>
  232 + <version>2.0</version>
  233 + <exclusions>
  234 + <exclusion>
  235 + <groupId>org.apache.struts</groupId>
  236 + <artifactId>struts-core</artifactId>
  237 + </exclusion>
  238 + <exclusion>
  239 + <groupId>org.apache.struts</groupId>
  240 + <artifactId>struts-taglib</artifactId>
  241 + </exclusion>
  242 + <exclusion>
  243 + <groupId>org.apache.struts</groupId>
  244 + <artifactId>struts-tiles</artifactId>
  245 + </exclusion>
  246 + <exclusion>
  247 + <groupId>sslext</groupId>
  248 + <artifactId>sslext</artifactId>
  249 + </exclusion>
  250 + <exclusion>
  251 + <artifactId>servlet-api</artifactId>
  252 + <groupId>javax.servlet</groupId>
  253 + </exclusion>
  254 + <exclusion>
  255 + <artifactId>commons-digester</artifactId>
  256 + <groupId>commons-digester</groupId>
  257 + </exclusion>
  258 + </exclusions>
  259 + </dependency>
  260 + <!-- if you enable json support in spring mvc. -->
  261 + <dependency>
  262 + <groupId>org.codehaus.jackson</groupId>
  263 + <artifactId>jackson-mapper-asl</artifactId>
  264 + <version>${jackson.version}</version>
  265 + </dependency>
  266 + <!-- test scope -->
  267 + <dependency>
  268 + <groupId>junit</groupId>
  269 + <artifactId>junit</artifactId>
  270 + <version>4.10</version>
  271 + <scope>test</scope>
  272 + </dependency>
198 273  
199   - <!-- 工具类 -->
200   - <!-- google sets,maps -->
201   - <!--<dependency>-->
202   - <!--<groupId>com.google.guava</groupId>-->
203   - <!--<artifactId>guava</artifactId>-->
204   - <!--<version>14.0.1</version>-->
205   - <!--</dependency>-->
206   - <!-- JSON -->
207   - <dependency>
208   - <groupId>com.alibaba</groupId>
209   - <artifactId>fastjson</artifactId>
210   - <version>1.1.31</version>
211   - </dependency>
212   - <dependency>
213   - <groupId>org.aspectj</groupId>
214   - <artifactId>aspectjweaver</artifactId>
215   - <version>1.7.2</version>
216   - </dependency>
217   - <!--<dependency>-->
218   - <!--<groupId>cglib</groupId>-->
219   - <!--<artifactId>cglib-nodep</artifactId>-->
220   - <!--<version>2.1_3</version>-->
221   - <!--</dependency>-->
  274 + <dependency>
  275 + <groupId>javax.servlet</groupId>
  276 + <artifactId>servlet-api</artifactId>
  277 + <version>3.0-alpha-1</version>
  278 + <scope>provided</scope>
  279 + </dependency>
222 280  
223   - <!-- common logging replacer -->
224   - <dependency>
225   - <groupId>org.slf4j</groupId>
226   - <artifactId>jcl-over-slf4j</artifactId>
227   - <version>${slf4j.version}</version>
228   - </dependency>
229   - <!-- if you enable @AspectJ style AOP in spring. -->
230   - <dependency>
231   - <groupId>org.aspectj</groupId>
232   - <artifactId>aspectjrt</artifactId>
233   - <version>${aspectj.version}</version>
234   - </dependency>
235   - <!-- if you enable JSR303 (Bean Validation) in spring. -->
236   - <!--<dependency>-->
237   - <!--<groupId>org.hibernate</groupId>-->
238   - <!--<artifactId>hibernate-validator</artifactId>-->
239   - <!--<version>4.2.0.Final</version>-->
240   - <!--</dependency>-->
241   - <!-- if you use velocity view in springmvc -->
242   - <dependency>
243   - <groupId>org.apache.velocity</groupId>
244   - <artifactId>velocity</artifactId>
245   - <version>1.7</version>
246   - </dependency>
247   - <!-- if you use velocity layout view in springmvc -->
248   - <dependency>
249   - <groupId>org.apache.velocity</groupId>
250   - <artifactId>velocity-tools</artifactId>
251   - <version>2.0</version>
252   - <exclusions>
253   - <exclusion>
254   - <groupId>org.apache.struts</groupId>
255   - <artifactId>struts-core</artifactId>
256   - </exclusion>
257   - <exclusion>
258   - <groupId>org.apache.struts</groupId>
259   - <artifactId>struts-taglib</artifactId>
260   - </exclusion>
261   - <exclusion>
262   - <groupId>org.apache.struts</groupId>
263   - <artifactId>struts-tiles</artifactId>
264   - </exclusion>
265   - <exclusion>
266   - <groupId>sslext</groupId>
267   - <artifactId>sslext</artifactId>
268   - </exclusion>
269   - </exclusions>
270   - </dependency>
271   - <!-- if you enable json support in spring mvc. -->
272   - <dependency>
273   - <groupId>org.codehaus.jackson</groupId>
274   - <artifactId>jackson-mapper-asl</artifactId>
275   - <version>${jackson.version}</version>
276   - </dependency>
277   - <!-- test scope -->
278   - <dependency>
279   - <groupId>junit</groupId>
280   - <artifactId>junit</artifactId>
281   - <version>4.10</version>
282   - <scope>test</scope>
283   - </dependency>
284   - <dependency>
285   - <groupId>javax.servlet</groupId>
286   - <artifactId>servlet-api</artifactId>
287   - <version>2.4</version>
288   - <scope>provided</scope>
289   - </dependency>
290   -
291   - <dependency>
292   - <groupId>redis.clients</groupId>
293   - <artifactId>jedis</artifactId>
294   - <version>2.4.2</version>
295   - </dependency>
296   - <dependency>
297   - <groupId>org.springframework.data</groupId>
298   - <artifactId>spring-data-redis</artifactId>
299   - <version>1.3.0.RELEASE</version>
300   - <exclusions>
301   - <exclusion>
302   - <groupId>org.springframework</groupId>
303   - <artifactId>spring-core</artifactId>
304   - </exclusion>
305   - <exclusion>
306   - <groupId>org.springframework</groupId>
307   - <artifactId>spring-aop</artifactId>
308   - </exclusion>
309   - <exclusion>
310   - <groupId>org.springframework</groupId>
311   - <artifactId>spring-context</artifactId>
312   - </exclusion>
313   - </exclusions>
314   - </dependency>
315   - <dependency>
316   - <artifactId>hbase-client</artifactId>
317   - <groupId>org.apache.hbase</groupId>
318   - <version>0.96.1.1-cdh5.0.0</version>
319   - </dependency>
320   - <dependency>
321   - <groupId>org.springframework</groupId>
322   - <artifactId>spring-test</artifactId>
323   - <version>${spring.version}</version>
324   - </dependency>
325   - <dependency>
326   - <groupId>org.apache.httpcomponents</groupId>
327   - <artifactId>httpclient</artifactId>
328   - <version>4.3.3</version>
329   - </dependency>
  281 + <dependency>
  282 + <groupId>redis.clients</groupId>
  283 + <artifactId>jedis</artifactId>
  284 + <version>2.4.2</version>
  285 + </dependency>
  286 + <dependency>
  287 + <groupId>org.springframework.data</groupId>
  288 + <artifactId>spring-data-redis</artifactId>
  289 + <version>1.3.0.RELEASE</version>
  290 + <exclusions>
  291 + <exclusion>
  292 + <groupId>org.springframework</groupId>
  293 + <artifactId>spring-core</artifactId>
  294 + </exclusion>
  295 + <exclusion>
  296 + <groupId>org.springframework</groupId>
  297 + <artifactId>spring-aop</artifactId>
  298 + </exclusion>
  299 + <exclusion>
  300 + <groupId>org.springframework</groupId>
  301 + <artifactId>spring-context</artifactId>
  302 + </exclusion>
  303 + </exclusions>
  304 + </dependency>
  305 + <dependency>
  306 + <artifactId>hbase-client</artifactId>
  307 + <exclusions>
  308 + <exclusion>
  309 + <artifactId>servlet-api</artifactId>
  310 + <groupId>javax.servlet</groupId>
  311 + </exclusion>
  312 + </exclusions>
  313 + <groupId>org.apache.hbase</groupId>
  314 + <version>0.96.1.1-cdh5.0.0</version>
  315 + </dependency>
  316 + <dependency>
  317 + <groupId>org.springframework</groupId>
  318 + <artifactId>spring-test</artifactId>
  319 + <version>${spring.version}</version>
  320 + </dependency>
  321 + <dependency>
  322 + <groupId>org.apache.httpcomponents</groupId>
  323 + <artifactId>httpclient</artifactId>
  324 + <version>4.3.3</version>
  325 + </dependency>
330 326 <dependency>
331 327 <groupId>net.bull.javamelody</groupId>
332 328 <artifactId>javamelody-core</artifactId>
... ... @@ -337,30 +333,170 @@
337 333 <groupId>commons-fileupload</groupId>
338 334 <artifactId>commons-fileupload</artifactId>
339 335 <version>1.3</version>
  336 + <exclusions>
  337 + <exclusion>
  338 + <artifactId>commons-io</artifactId>
  339 + <groupId>commons-io</groupId>
  340 + </exclusion>
  341 + </exclusions>
340 342 </dependency>
341 343 <!--监控平台接入 -->
342 344 <dependency>
343 345 <groupId>com.dili.dd.monitor</groupId>
344 346 <artifactId>monitor</artifactId>
345 347 <version>0.0.3-SNAPSHOT</version>
  348 + <exclusions>
  349 + <exclusion>
  350 + <artifactId>servlet-api</artifactId>
  351 + <groupId>org.mortbay.jetty</groupId>
  352 + </exclusion>
  353 + </exclusions>
  354 + </dependency>
  355 + <dependency>
  356 + <groupId>com.yqyw.messageCenter.sdk</groupId>
  357 + <artifactId>diligrp-messageCenter-sdk</artifactId>
  358 + <version>0.0.4-SNAPSHOT</version>
  359 + </dependency>
  360 + <dependency>
  361 + <groupId>com.diligrp.website.web</groupId>
  362 + <artifactId>diligrp-website-api</artifactId>
  363 + <version>1.0.0-SNAPSHOT</version>
  364 + <exclusions>
  365 + <exclusion>
  366 + <artifactId>servlet-api</artifactId>
  367 + <groupId>javax.servlet</groupId>
  368 + </exclusion>
  369 + <exclusion>
  370 + <artifactId>fastjson</artifactId>
  371 + <groupId>com.alibaba</groupId>
  372 + </exclusion>
  373 + <exclusion>
  374 + <artifactId>mybatis</artifactId>
  375 + <groupId>org.mybatis</groupId>
  376 + </exclusion>
  377 + <exclusion>
  378 + <artifactId>guava</artifactId>
  379 + <groupId>com.google.guava</groupId>
  380 + </exclusion>
  381 + <exclusion>
  382 + <artifactId>spring-webmvc</artifactId>
  383 + <groupId>org.springframework</groupId>
  384 + </exclusion>
  385 + </exclusions>
  386 + </dependency>
  387 + <dependency>
  388 + <groupId>com.yqyw.website.web</groupId>
  389 + <artifactId>diligrp-website-api</artifactId>
  390 + <version>1.0.3-SNAPSHOT</version>
  391 + <exclusions>
  392 + <exclusion>
  393 + <artifactId>servlet-api</artifactId>
  394 + <groupId>javax.servlet</groupId>
  395 + </exclusion>
  396 + <exclusion>
  397 + <artifactId>fastjson</artifactId>
  398 + <groupId>com.alibaba</groupId>
  399 + </exclusion>
  400 + <exclusion>
  401 + <artifactId>mybatis</artifactId>
  402 + <groupId>org.mybatis</groupId>
  403 + </exclusion>
  404 + <exclusion>
  405 + <artifactId>guava</artifactId>
  406 + <groupId>com.google.guava</groupId>
  407 + </exclusion>
  408 + <exclusion>
  409 + <artifactId>spring-webmvc</artifactId>
  410 + <groupId>org.springframework</groupId>
  411 + </exclusion>
  412 + </exclusions>
346 413 </dependency>
347   - </dependencies>
  414 + <dependency>
  415 + <groupId>com.yqyw.filter</groupId>
  416 + <artifactId>filter-keysdk</artifactId>
  417 + <version>0.0.1-SNAPSHOT</version>
  418 + <exclusions>
  419 + <exclusion>
  420 + <artifactId>mybatis</artifactId>
  421 + <groupId>org.mybatis</groupId>
  422 + </exclusion>
  423 + <exclusion>
  424 + <artifactId>spring-context-support</artifactId>
  425 + <groupId>org.springframework</groupId>
  426 + </exclusion>
  427 + <exclusion>
  428 + <artifactId>spring-context</artifactId>
  429 + <groupId>org.springframework</groupId>
  430 + </exclusion>
  431 + </exclusions>
  432 + </dependency>
  433 +
  434 + <dependency>
  435 + <groupId>com.yqyw.user</groupId>
  436 + <artifactId>diligrp-user-client</artifactId>
  437 + <version>0.0.4-SNAPSHOT</version>
  438 + <exclusions>
  439 + <exclusion>
  440 + <artifactId>diligrp-website-util</artifactId>
  441 + <groupId>com.diligrp.website</groupId>
  442 + </exclusion>
  443 + </exclusions>
  444 + </dependency>
  445 + <dependency>
  446 + <groupId>com.yqyw.shop</groupId>
  447 + <artifactId>shop-sdk</artifactId>
  448 + <version>0.0.2-SNAPSHOT</version>
  449 + </dependency>
  450 + <dependency>
  451 + <groupId>com.diligrp</groupId>
  452 + <artifactId>diligrp-crm-api</artifactId>
  453 + <!--更换最新的 chenzhiwei-->
  454 + <version>0.0.1-SNAPSHOT</version>
  455 + <exclusions>
  456 + <exclusion>
  457 + <groupId>org.apache.httpcomponents</groupId>
  458 + <artifactId>httpcore</artifactId>
  459 + </exclusion>
  460 + </exclusions>
  461 + </dependency>
  462 +
  463 + <dependency>
  464 + <groupId>com.yqyw.filter</groupId>
  465 + <artifactId>filter-keysdk</artifactId>
  466 + <version>0.0.1-SNAPSHOT</version>
  467 + <exclusions>
  468 + <exclusion>
  469 + <artifactId>mybatis</artifactId>
  470 + <groupId>org.mybatis</groupId>
  471 + </exclusion>
  472 + <exclusion>
  473 + <artifactId>spring-context-support</artifactId>
  474 + <groupId>org.springframework</groupId>
  475 + </exclusion>
  476 + <exclusion>
  477 + <artifactId>spring-context</artifactId>
  478 + <groupId>org.springframework</groupId>
  479 + </exclusion>
  480 + </exclusions>
  481 + </dependency>
  482 +
  483 + </dependencies>
348 484  
349   - <!-- 打包配置信息 -->
350   - <profiles>
351   - <profile>
352   - <!-- 开发环境 -->
353   - <id>develop</id>
354   - <!-- 默认 -->
355   - <activation>
356   - <activeByDefault>true</activeByDefault>
357   - </activation>
358   - <properties>
359   - <package.env>develop</package.env>
360   - <!--jdbc type -->
361   - <dili_titan.jdbc.datasource.type>dbcp</dili_titan.jdbc.datasource.type>
362   - <!-- 数据库 -->
363   - <dili_titan.jdbc.driver>com.mysql.jdbc.Driver</dili_titan.jdbc.driver>
  485 + <!-- 打包配置信息 -->
  486 + <profiles>
  487 + <profile>
  488 + <!-- 开发环境 -->
  489 + <id>develop</id>
  490 + <!-- 默认 -->
  491 + <activation>
  492 + <activeByDefault>true</activeByDefault>
  493 + </activation>
  494 + <properties>
  495 + <package.env>develop</package.env>
  496 + <!--jdbc type -->
  497 + <dili_titan.jdbc.datasource.type>dbcp</dili_titan.jdbc.datasource.type>
  498 + <!-- 数据库 -->
  499 + <dili_titan.jdbc.driver>com.mysql.jdbc.Driver</dili_titan.jdbc.driver>
364 500 <!-- 主库配置 -->
365 501 <dili_titan.master.jdbc.url>jdbc:MySql://10.28.10.188:3306/agriez_titan?useUnicode=true&amp;characterEncoding=utf8</dili_titan.master.jdbc.url>
366 502 <dili_titan.master.jdbc.username>root</dili_titan.master.jdbc.username>
... ... @@ -369,16 +505,16 @@
369 505 <dili_titan.slave.jdbc.url>jdbc:MySql://10.28.10.188:3306/agriez_titan?useUnicode=true&amp;characterEncoding=utf8</dili_titan.slave.jdbc.url>
370 506 <dili_titan.slave.jdbc.username>du</dili_titan.slave.jdbc.username>
371 507 <dili_titan.slave.jdbc.password>123456</dili_titan.slave.jdbc.password>
372   - <!-- crm接口地址 -->
373   - <dili_titan.crm.url>supplier.1n4j.com</dili_titan.crm.url>
374   - <!-- user接口地址 -->
375   - <dili_titan.user.url>user.1n4j.com</dili_titan.user.url>
  508 + <!-- crm接口地址 -->
  509 + <dili_titan.crm.url>supplier.1n4j.com</dili_titan.crm.url>
  510 + <!-- user接口地址 -->
  511 + <dili_titan.user.url>user.1n4j.com</dili_titan.user.url>
376 512 <!--关键字接口地址-->
377 513 <dili_titan.keywords.url>keyword.filter.1n4j.com</dili_titan.keywords.url>
378 514 <!--shop接口地址,需要测试自己修改 -->
379 515 <dili_titan.shop.url>http://shop.1n4j.com</dili_titan.shop.url>
380   - <!-- redis接口地址 -->
381   - <dili_titan.redis.url>10.28.10.208</dili_titan.redis.url>
  516 + <!-- redis接口地址 -->
  517 + <dili_titan.redis.url>10.28.10.208</dili_titan.redis.url>
382 518 <!--权限管理的redis配置-->
383 519 <manage.redis.url>10.28.10.208</manage.redis.url>
384 520 <manage.redis.port>6379</manage.redis.port>
... ... @@ -387,31 +523,31 @@
387 523 <conf.mq.producerGroup>titanPNR</conf.mq.producerGroup>
388 524 <!-- website接口地址 -->
389 525 <dili_titan.website.url>manweb.1n4j.com</dili_titan.website.url>
390   - <!-- 日志 -->
  526 + <!-- 日志 -->
391 527 <dili_titan.log.level>INFO</dili_titan.log.level>
392 528 <dili_titan.log.path>/export/logs</dili_titan.log.path>
393 529 <dili_titan.log.root.appender>CONSOLE</dili_titan.log.root.appender>
394   - <!--打包编码 -->
395   - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
396   - <!-- 图片服务器前缀 -->
397   - <project.imageserver.prefix>http://img0.1n4j.com</project.imageserver.prefix>
  530 + <!--打包编码 -->
  531 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  532 + <!-- 图片服务器前缀 -->
  533 + <project.imageserver.prefix>http://img0.1n4j.com</project.imageserver.prefix>
398 534 <!--爱奇艺视频 -->
399 535 <titan.aqy.appkey>e64a09bece964bb484e5decc30c0b950</titan.aqy.appkey>
400   - <titan.aqy.appSecret>f48d2b799f9661acdb6041e4ac7c142f</titan.aqy.appSecret>
401   - </properties>
402   - </profile>
403   - <profile>
404   - <!-- 测试环境 -->
405   - <id>test</id>
406   - <activation>
407   - <activeByDefault>false</activeByDefault>
408   - </activation>
409   - <properties>
410   - <package.env>test</package.env>
411   - <!--jdbc type -->
412   - <dili_titan.jdbc.datasource.type>dbcp</dili_titan.jdbc.datasource.type>
413   - <!-- 数据库 -->
414   - <dili_titan.jdbc.driver>com.mysql.jdbc.Driver</dili_titan.jdbc.driver>
  536 + <titan.aqy.appSecret>f48d2b799f9661acdb6041e4ac7c142f</titan.aqy.appSecret>
  537 + </properties>
  538 + </profile>
  539 + <profile>
  540 + <!-- 测试环境 -->
  541 + <id>test</id>
  542 + <activation>
  543 + <activeByDefault>false</activeByDefault>
  544 + </activation>
  545 + <properties>
  546 + <package.env>test</package.env>
  547 + <!--jdbc type -->
  548 + <dili_titan.jdbc.datasource.type>dbcp</dili_titan.jdbc.datasource.type>
  549 + <!-- 数据库 -->
  550 + <dili_titan.jdbc.driver>com.mysql.jdbc.Driver</dili_titan.jdbc.driver>
415 551 <!-- 主库配置 -->
416 552 <dili_titan.master.jdbc.url>jdbc:MySql://10.28.6.156:3306/agriez_titan?useUnicode=true&amp;characterEncoding=utf8</dili_titan.master.jdbc.url>
417 553 <dili_titan.master.jdbc.username>root</dili_titan.master.jdbc.username>
... ... @@ -420,16 +556,16 @@
420 556 <dili_titan.slave.jdbc.url>jdbc:MySql://10.28.6.155:3306/agriez_titan?useUnicode=true&amp;characterEncoding=utf8</dili_titan.slave.jdbc.url>
421 557 <dili_titan.slave.jdbc.username>agriez_titan_reader</dili_titan.slave.jdbc.username>
422 558 <dili_titan.slave.jdbc.password>123456</dili_titan.slave.jdbc.password>
423   - <!-- crm接口地址 -->
424   - <dili_titan.crm.url>supplier.1n4j.com</dili_titan.crm.url>
425   - <!-- user接口地址,需要测试自己修改 -->
426   - <dili_titan.user.url>user.1n4j.com</dili_titan.user.url>
  559 + <!-- crm接口地址 -->
  560 + <dili_titan.crm.url>supplier.1n4j.com</dili_titan.crm.url>
  561 + <!-- user接口地址,需要测试自己修改 -->
  562 + <dili_titan.user.url>user.1n4j.com</dili_titan.user.url>
427 563 <!--关键字接口地址-->
428 564 <dili_titan.keywords.url>keyword.filter.1n4j.com</dili_titan.keywords.url>
429 565 <!--shop接口地址,需要测试自己修改 -->
430 566 <dili_titan.shop.url>http://shop.1n4j.com</dili_titan.shop.url>
431   - <!-- redis接口地址 -->
432   - <dili_titan.redis.url>10.28.10.207</dili_titan.redis.url>
  567 + <!-- redis接口地址 -->
  568 + <dili_titan.redis.url>10.28.10.207</dili_titan.redis.url>
433 569 <!--权限管理的redis配置-->
434 570 <manage.redis.url>10.28.10.207</manage.redis.url>
435 571 <manage.redis.port>6379</manage.redis.port>
... ... @@ -438,87 +574,87 @@
438 574 <conf.mq.producerGroup>titanPNR</conf.mq.producerGroup>
439 575 <!-- website接口地址 -->
440 576 <dili_titan.website.url>manweb.1n4j.com</dili_titan.website.url>
441   - <!-- 日志 -->
  577 + <!-- 日志 -->
442 578 <dili_titan.log.level>INFO</dili_titan.log.level>
443 579 <dili_titan.log.path>/home/tomcat/export</dili_titan.log.path>
444 580 <dili_titan.log.root.appender>CONSOLE</dili_titan.log.root.appender>
445   - <!--打包编码 -->
446   - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
447   - <!-- 图片服务器前缀 -->
448   - <project.imageserver.prefix>http://img0.1n4j.com</project.imageserver.prefix>
  581 + <!--打包编码 -->
  582 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  583 + <!-- 图片服务器前缀 -->
  584 + <project.imageserver.prefix>http://img0.1n4j.com</project.imageserver.prefix>
449 585 <!--爱奇艺视频 -->
450 586 <titan.aqy.appkey>e64a09bece964bb484e5decc30c0b950</titan.aqy.appkey>
451   - <titan.aqy.appSecret>f48d2b799f9661acdb6041e4ac7c142f</titan.aqy.appSecret>
452   - </properties>
453   - </profile>
  587 + <titan.aqy.appSecret>f48d2b799f9661acdb6041e4ac7c142f</titan.aqy.appSecret>
  588 + </properties>
  589 + </profile>
454 590  
455   - <profile>
456   - <!--预发布环境-->
457   - <id>pre-online</id>
458   - <!-- 默认 -->
459   - <activation>
460   - <activeByDefault>false</activeByDefault>
461   - </activation>
462   - <properties>
463   - <package.env>pre-online</package.env>
  591 + <profile>
  592 + <!--预发布环境-->
  593 + <id>pre-online</id>
  594 + <!-- 默认 -->
  595 + <activation>
  596 + <activeByDefault>false</activeByDefault>
  597 + </activation>
  598 + <properties>
  599 + <package.env>pre-online</package.env>
464 600  
465   - <!--jdbc type -->
466   - <dili_titan.jdbc.datasource.type>dbcp</dili_titan.jdbc.datasource.type>
467   - <!-- 数据库 -->
468   - <dili_titan.jdbc.driver>com.mysql.jdbc.Driver</dili_titan.jdbc.driver>
469   - <!-- 主库配置 -->
470   - <dili_titan.master.jdbc.url>jdbc:MySql://titan.db.1n4j.com:3306/agriez_titan?useUnicode=true&amp;characterEncoding=utf8</dili_titan.master.jdbc.url>
471   - <dili_titan.master.jdbc.username>root</dili_titan.master.jdbc.username>
472   - <dili_titan.master.jdbc.password>123456</dili_titan.master.jdbc.password>
473   - <!-- 从库配置 -->
474   - <dili_titan.slave.jdbc.url>jdbc:MySql://titan.db.1n4j.com:3306/agriez_titan?useUnicode=true&amp;characterEncoding=utf8</dili_titan.slave.jdbc.url>
475   - <dili_titan.slave.jdbc.username>root</dili_titan.slave.jdbc.username>
476   - <dili_titan.slave.jdbc.password>123456</dili_titan.slave.jdbc.password>
477   - <!-- crm接口地址 -->
478   - <dili_titan.crm.url>supplier.1n4j.com</dili_titan.crm.url>
479   - <!-- user接口地址 -->
480   - <dili_titan.user.url>user.1n4j.com</dili_titan.user.url>
481   - <!--关键字接口地址-->
482   - <dili_titan.keywords.url>keyword.filter.1n4j.com</dili_titan.keywords.url>
483   - <!--shop接口地址,需要测试自己修改 -->
484   - <dili_titan.shop.url>http://shop.1n4j.com</dili_titan.shop.url>
485   - <!-- redis接口地址 -->
486   - <dili_titan.redis.url>redis.1n4j.com</dili_titan.redis.url>
487   - <!--权限管理的redis配置-->
488   - <manage.redis.url>redis.1n4j.com</manage.redis.url>
489   - <manage.redis.port>6379</manage.redis.port>
490   - <!-- MQ 地址-->
491   - <conf.mq.namesrvAddr>10.28.6.51:9876</conf.mq.namesrvAddr>
492   - <conf.mq.producerGroup>titanPNR</conf.mq.producerGroup>
493   - <!-- website接口地址 -->
494   - <dili_titan.website.url>manweb.1n4j.com</dili_titan.website.url>
495   - <!-- 日志 -->
496   - <dili_titan.log.level>INFO</dili_titan.log.level>
497   - <dili_titan.log.path>/diliapp/servers/logs</dili_titan.log.path>
498   - <dili_titan.log.root.appender>FILE_ALL</dili_titan.log.root.appender>
499   - <!--打包编码 -->
500   - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
501   - <!-- 图片服务器前缀 -->
502   - <project.imageserver.prefix>http://img0.1n4j.com</project.imageserver.prefix>
503   - <!--爱奇艺视频 -->
504   - <titan.aqy.appkey>f689d13d9dce48039cae27e6e03940c6</titan.aqy.appkey>
505   - <titan.aqy.appSecret>8633dfebb9f4443d0f1244262bca94f6</titan.aqy.appSecret>
506   - </properties>
507   - </profile>
  601 + <!--jdbc type -->
  602 + <dili_titan.jdbc.datasource.type>dbcp</dili_titan.jdbc.datasource.type>
  603 + <!-- 数据库 -->
  604 + <dili_titan.jdbc.driver>com.mysql.jdbc.Driver</dili_titan.jdbc.driver>
  605 + <!-- 主库配置 -->
  606 + <dili_titan.master.jdbc.url>jdbc:MySql://titan.db.1n4j.com:3306/agriez_titan?useUnicode=true&amp;characterEncoding=utf8</dili_titan.master.jdbc.url>
  607 + <dili_titan.master.jdbc.username>root</dili_titan.master.jdbc.username>
  608 + <dili_titan.master.jdbc.password>123456</dili_titan.master.jdbc.password>
  609 + <!-- 从库配置 -->
  610 + <dili_titan.slave.jdbc.url>jdbc:MySql://titan.db.1n4j.com:3306/agriez_titan?useUnicode=true&amp;characterEncoding=utf8</dili_titan.slave.jdbc.url>
  611 + <dili_titan.slave.jdbc.username>root</dili_titan.slave.jdbc.username>
  612 + <dili_titan.slave.jdbc.password>123456</dili_titan.slave.jdbc.password>
  613 + <!-- crm接口地址 -->
  614 + <dili_titan.crm.url>supplier.1n4j.com</dili_titan.crm.url>
  615 + <!-- user接口地址 -->
  616 + <dili_titan.user.url>user.1n4j.com</dili_titan.user.url>
  617 + <!--关键字接口地址-->
  618 + <dili_titan.keywords.url>keyword.filter.1n4j.com</dili_titan.keywords.url>
  619 + <!--shop接口地址,需要测试自己修改 -->
  620 + <dili_titan.shop.url>http://shop.1n4j.com</dili_titan.shop.url>
  621 + <!-- redis接口地址 -->
  622 + <dili_titan.redis.url>redis.1n4j.com</dili_titan.redis.url>
  623 + <!--权限管理的redis配置-->
  624 + <manage.redis.url>redis.1n4j.com</manage.redis.url>
  625 + <manage.redis.port>6379</manage.redis.port>
  626 + <!-- MQ 地址-->
  627 + <conf.mq.namesrvAddr>10.28.6.51:9876</conf.mq.namesrvAddr>
  628 + <conf.mq.producerGroup>titanPNR</conf.mq.producerGroup>
  629 + <!-- website接口地址 -->
  630 + <dili_titan.website.url>manweb.1n4j.com</dili_titan.website.url>
  631 + <!-- 日志 -->
  632 + <dili_titan.log.level>INFO</dili_titan.log.level>
  633 + <dili_titan.log.path>/diliapp/servers/logs</dili_titan.log.path>
  634 + <dili_titan.log.root.appender>FILE_ALL</dili_titan.log.root.appender>
  635 + <!--打包编码 -->
  636 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  637 + <!-- 图片服务器前缀 -->
  638 + <project.imageserver.prefix>http://img0.1n4j.com</project.imageserver.prefix>
  639 + <!--爱奇艺视频 -->
  640 + <titan.aqy.appkey>f689d13d9dce48039cae27e6e03940c6</titan.aqy.appkey>
  641 + <titan.aqy.appSecret>8633dfebb9f4443d0f1244262bca94f6</titan.aqy.appSecret>
  642 + </properties>
  643 + </profile>
508 644  
509   - <profile>
510   - <!--上线环境-->
511   - <id>online</id>
512   - <!-- 默认 -->
513   - <activation>
514   - <activeByDefault>false</activeByDefault>
515   - </activation>
516   - <properties>
517   - <package.env>online</package.env>
518   - <!--jdbc type -->
519   - <dili_titan.jdbc.datasource.type>dbcp</dili_titan.jdbc.datasource.type>
520   - <!-- 数据库 -->
521   - <dili_titan.jdbc.driver>com.mysql.jdbc.Driver</dili_titan.jdbc.driver>
  645 + <profile>
  646 + <!--上线环境-->
  647 + <id>online</id>
  648 + <!-- 默认 -->
  649 + <activation>
  650 + <activeByDefault>false</activeByDefault>
  651 + </activation>
  652 + <properties>
  653 + <package.env>online</package.env>
  654 + <!--jdbc type -->
  655 + <dili_titan.jdbc.datasource.type>dbcp</dili_titan.jdbc.datasource.type>
  656 + <!-- 数据库 -->
  657 + <dili_titan.jdbc.driver>com.mysql.jdbc.Driver</dili_titan.jdbc.driver>
522 658 <!-- 主库配置 -->
523 659 <dili_titan.master.jdbc.url>jdbc:MySql://titan.db.1n4j.com:3306/agriez_titan?useUnicode=true&amp;characterEncoding=utf8</dili_titan.master.jdbc.url>
524 660 <dili_titan.master.jdbc.username>appAccPayor</dili_titan.master.jdbc.username>
... ... @@ -527,16 +663,16 @@
527 663 <dili_titan.slave.jdbc.url>jdbc:MySql://192.168.60.61:3306/agriez_titan?useUnicode=true&amp;characterEncoding=utf8</dili_titan.slave.jdbc.url>
528 664 <dili_titan.slave.jdbc.username>appAccPayor</dili_titan.slave.jdbc.username>
529 665 <dili_titan.slave.jdbc.password>iTDYVBtI6MX4NQ3Er2Oh</dili_titan.slave.jdbc.password>
530   - <!-- crm接口地址 -->
531   - <dili_titan.crm.url>supplier.1n4j.com</dili_titan.crm.url>
532   - <!-- user接口地址 -->
533   - <dili_titan.user.url>user.1n4j.com</dili_titan.user.url>
  666 + <!-- crm接口地址 -->
  667 + <dili_titan.crm.url>supplier.1n4j.com</dili_titan.crm.url>
  668 + <!-- user接口地址 -->
  669 + <dili_titan.user.url>user.1n4j.com</dili_titan.user.url>
534 670 <!--关键字接口地址-->
535 671 <dili_titan.keywords.url>keyword.filter.1n4j.com</dili_titan.keywords.url>
536 672 <!--shop接口地址,需要测试自己修改 -->
537 673 <dili_titan.shop.url>http://shop.1n4j.com</dili_titan.shop.url>
538   - <!-- redis接口地址 -->
539   - <dili_titan.redis.url>redis.1n4j.com</dili_titan.redis.url>
  674 + <!-- redis接口地址 -->
  675 + <dili_titan.redis.url>redis.1n4j.com</dili_titan.redis.url>
540 676 <!--权限管理的redis配置-->
541 677 <manage.redis.url>redis.1n4j.com</manage.redis.url>
542 678 <manage.redis.port>6379</manage.redis.port>
... ... @@ -545,19 +681,19 @@
545 681 <conf.mq.producerGroup>titanPNR</conf.mq.producerGroup>
546 682 <!-- website接口地址 -->
547 683 <dili_titan.website.url>manweb.1n4j.com</dili_titan.website.url>
548   - <!-- 日志 -->
  684 + <!-- 日志 -->
549 685 <dili_titan.log.level>INFO</dili_titan.log.level>
550 686 <dili_titan.log.path>/diliapp/servers/logs</dili_titan.log.path>
551 687 <dili_titan.log.root.appender>FILE_ALL</dili_titan.log.root.appender>
552   - <!--打包编码 -->
553   - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
554   - <!-- 图片服务器前缀 -->
555   - <project.imageserver.prefix>http://img0.1n4j.com</project.imageserver.prefix>
  688 + <!--打包编码 -->
  689 + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  690 + <!-- 图片服务器前缀 -->
  691 + <project.imageserver.prefix>http://img0.1n4j.com</project.imageserver.prefix>
556 692 <!--爱奇艺视频 -->
557 693 <titan.aqy.appkey>f689d13d9dce48039cae27e6e03940c6</titan.aqy.appkey>
558   - <titan.aqy.appSecret>8633dfebb9f4443d0f1244262bca94f6</titan.aqy.appSecret>
559   - </properties>
560   - </profile>
  694 + <titan.aqy.appSecret>8633dfebb9f4443d0f1244262bca94f6</titan.aqy.appSecret>
  695 + </properties>
  696 + </profile>
561 697  
562 698 <profile>
563 699 <!-- 测试环境 -->
... ... @@ -613,6 +749,6 @@
613 749 <titan.aqy.appSecret>8633dfebb9f4443d0f1244262bca94f6</titan.aqy.appSecret>
614 750 </properties>
615 751 </profile>
616   - </profiles>
  752 + </profiles>
617 753  
618 754 </project>
... ...
titan-api/src/main/java/com/dili/titan/service/gq/impl/SupplyServiceImpl.java deleted 100755 → 0
1   -package com.dili.titan.service.gq.impl;
2   -
3   -import com.alibaba.fastjson.JSON;
4   -import com.dili.titan.rpc.redis.JedisClient;
5   -import com.dili.titan.dao.base.BaseDao;
6   -import com.dili.titan.dao.gq.SupplyDao;
7   -import com.dili.titan.domain.base.RedisKeyConstant;
8   -import com.dili.titan.domain.gq.Supply;
9   -import com.dili.titan.service.base.BaseServiceImpl;
10   -import com.dili.titan.service.gq.SupplyService;
11   -import org.springframework.stereotype.Service;
12   -import org.springframework.util.StringUtils;
13   -
14   -import javax.annotation.Resource;
15   -import java.util.ArrayList;
16   -import java.util.List;
17   -
18   -/**
19   - * <p>Title: 〈标题〉</p>
20   - * <p>Description: 〈描述〉</p>
21   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
22   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
23   - * <B>Company</B> 地利集团
24   - * <p>CreateTime:2015/3/24</p>
25   - *
26   - * @author gongsz
27   - */
28   -@Service
29   -public class SupplyServiceImpl extends BaseServiceImpl<Supply,Long> implements SupplyService {
30   -
31   - @Resource
32   - private SupplyDao supplyDao;
33   - @Resource(name = "jedisClient")
34   - private JedisClient client;
35   -
36   - @Override
37   - public BaseDao<Supply, Long> getDao() {
38   - return supplyDao;
39   - }
40   -
41   - @Override
42   - public List<Supply> getSupply(List<Long> pids) {
43   - List<Supply> list = new ArrayList<Supply>(pids.size());
44   - for (Long pid : pids) {
45   - String json = client.hget(RedisKeyConstant.SUPPLY_KEY, pid.toString());
46   - Supply presale = null;
47   - if (StringUtils.isEmpty(json)) {
48   - presale = supplyDao.selectEntry(pid);
49   - if (presale != null) {
50   - String jsonString = JSON.toJSONString(presale);
51   - client.hput(RedisKeyConstant.SUPPLY_KEY, String.valueOf(presale.getId()), jsonString, JedisClient.expireTime);
52   - }
53   - } else {
54   - presale = JSON.parseObject(json, Supply.class);
55   - }
56   - if (presale == null) {
57   - continue;
58   - }
59   - list.add(presale);
60   - }
61   - return list;
62   - }
63   -}
titan-api/src/main/java/com/dili/titan/service/product/impl/ProductImgServiceImpl.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.service.product.impl;
6   -
7   -import com.alibaba.fastjson.JSON;
8   -import com.dili.titan.dao.base.BaseDao;
9   -import com.dili.titan.dao.product.ProductImgDao;
10   -import com.dili.titan.domain.ProductImg;
11   -import com.dili.titan.domain.base.RedisKeyConstant;
12   -import com.dili.titan.rpc.redis.JedisClient;
13   -import com.dili.titan.service.ImageUtils;
14   -import com.dili.titan.service.base.BaseServiceImpl;
15   -import com.dili.titan.service.product.ProductImgService;
16   -import org.apache.commons.collections.CollectionUtils;
17   -import org.apache.commons.lang3.StringUtils;
18   -import org.springframework.stereotype.Service;
19   -import org.springframework.transaction.annotation.Transactional;
20   -
21   -import javax.annotation.Resource;
22   -import java.util.ArrayList;
23   -import java.util.List;
24   -
25   -/**
26   - * ProductImgService 实现类
27   - * @author dev-center
28   - * @since 2014-05-10
29   - */
30   -@Service("productImgService")
31   -public class ProductImgServiceImpl extends BaseServiceImpl<ProductImg,Long> implements ProductImgService {
32   -
33   - @Resource private ProductImgDao productImgDao;
34   -
35   - @Resource(name="jedisClient")
36   - private JedisClient client;
37   -
38   -
39   - @Override
40   - public BaseDao<ProductImg, Long> getDao() {
41   - return productImgDao;
42   - }
43   -
44   - @Override @Transactional
45   - public int batchInsert(List<ProductImg> list) {
46   - int result = 0;
47   - if (list != null && list.size() > 0) {
48   - result = productImgDao.batchInsert(list);
49   - }
50   - return result;
51   - }
52   -
53   - @Override @Transactional(rollbackFor = Exception.class)
54   - public int updateProductImg(Long pid, List<ProductImg> productImgs) {
55   - int result = 0;
56   - //删除pid下所有商品图片
57   - productImgDao.deleteByPid(pid);
58   - //批量插入商品图片
59   - if (productImgs != null && productImgs.size() > 0) {
60   - result = productImgDao.batchInsert(productImgs);
61   - }
62   - return result;
63   - }
64   -
65   - @Override
66   - public List<String> findImgByPid(Long pid) {
67   - List<String> listImg = new ArrayList<String>();
68   - String productImgStr = client.hget(RedisKeyConstant.PRODUCT_IMG, String.valueOf(pid));
69   - if(StringUtils.isNotEmpty(productImgStr)){
70   - listImg = JSON.parseArray(productImgStr, String.class);
71   - return listImg;
72   - }
73   - List<ProductImg> imgList = productImgDao.getByProductId(pid);
74   - if(CollectionUtils.isNotEmpty(imgList)) {
75   - for (ProductImg img : imgList) {
76   - String imgUrl = ImageUtils.getImageURL(img.getImgUrl());
77   - listImg.add(imgUrl);
78   - }
79   - client.hput(RedisKeyConstant.PRODUCT_IMG, String.valueOf(pid), JSON.toJSONString(listImg), JedisClient.expireTime);
80   - }
81   -
82   - return listImg;
83   - }
84   -}
titan-api/src/main/java/com/dili/titan/service/product/impl/ProductPopAttrServiceImpl.java deleted 100755 → 0
1   -package com.dili.titan.service.product.impl;
2   -
3   -import com.alibaba.fastjson.JSON;
4   -import com.dili.titan.common.datasource.DynamicSource;
5   -import com.dili.titan.rpc.redis.JedisClient;
6   -import com.dili.titan.dao.base.BaseDao;
7   -import com.dili.titan.dao.product.pop.ProductPopAttrDao;
8   -import com.dili.titan.domain.base.RedisKeyConstant;
9   -import com.dili.titan.domain.pop.ProductPopAttr;
10   -import com.dili.titan.service.base.BaseServiceImpl;
11   -import com.dili.titan.service.product.ProductPopAttrService;
12   -import org.apache.commons.lang.StringUtils;
13   -import org.springframework.stereotype.Service;
14   -
15   -import javax.annotation.Resource;
16   -import java.util.List;
17   -
18   -/**
19   - * <p>Title: 〈标题〉</p>
20   - * <p>Description: 〈描述〉</p>
21   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
22   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
23   - * <B>Company</B> 地利集团
24   - * <p>CreateTime:2015/4/7</p>
25   - *
26   - * @author gongsz
27   - */
28   -@Service("productPopAttrService")
29   -@DynamicSource
30   -public class ProductPopAttrServiceImpl extends BaseServiceImpl<ProductPopAttr,Long> implements ProductPopAttrService {
31   - @Resource
32   - private ProductPopAttrDao productPopAttrDao;
33   -
34   - @Resource(name="jedisClient")
35   - private JedisClient client;
36   -
37   -
38   - @Override
39   - public BaseDao<ProductPopAttr, Long> getDao() {
40   - return productPopAttrDao;
41   - }
42   -
43   - @Override
44   - public List<ProductPopAttr> findByPid(Long pid) {
45   - //获取商品属性
46   - List<ProductPopAttr> productPopAttrList = null;
47   - if(client.hasKey(RedisKeyConstant.PRODUCT_Pop_ATTR,String.valueOf(pid))){
48   - String productPopStr = client.hget(RedisKeyConstant.PRODUCT_Pop_ATTR, String.valueOf(pid));
49   - if(StringUtils.isNotEmpty(productPopStr)){
50   - productPopAttrList = JSON.parseArray(productPopStr, ProductPopAttr.class);
51   - }
52   - return productPopAttrList;
53   - }
54   - productPopAttrList = productPopAttrDao.findByPid(pid);
55   - client.hput(RedisKeyConstant.PRODUCT_Pop_ATTR, String.valueOf(pid), JSON.toJSONString(productPopAttrList), JedisClient.expireTime);
56   - return productPopAttrList;
57   - }
58   -}
titan-api/src/main/java/com/dili/titan/service/product/impl/ProductPopGroupBuyingServiceImpl.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2016 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.service.product.impl;
6   -
7   -import javax.annotation.Resource;
8   -
9   -import com.dili.titan.dao.base.BaseDao;
10   -import com.dili.titan.dao.product.ProductPopGroupBuyingDao;
11   -import com.dili.titan.domain.ProductPopGroupBuying;
12   -import com.dili.titan.service.base.BaseServiceImpl;
13   -import com.dili.titan.service.product.ProductPopGroupBuyingService;
14   -import org.springframework.stereotype.Service;
15   -import org.springframework.transaction.annotation.Transactional;
16   -
17   -
18   -/**
19   - * ProductPopGroupBuyingService 实现类
20   - * @author dev-center
21   - * @since 2016-09-13
22   - */
23   -@Service("productPopGroupBuyingService")
24   -public class ProductPopGroupBuyingServiceImpl extends BaseServiceImpl<ProductPopGroupBuying,Long> implements ProductPopGroupBuyingService {
25   -
26   - @Resource private ProductPopGroupBuyingDao productPopGroupBuyingDao;
27   -
28   - public BaseDao<ProductPopGroupBuying,Long> getDao() {
29   - return productPopGroupBuyingDao;
30   - }
31   -
32   - @Transactional(rollbackFor=Exception.class)
33   - public int insertEntryCreateId(ProductPopGroupBuying productPopGroupBuying) {
34   - return super.insertEntryCreateId(productPopGroupBuying);
35   - }
36   -}
37 0 \ No newline at end of file
titan-api/src/main/java/com/dili/titan/service/product/impl/ProductSampleServiceImpl.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2016 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.service.product.impl;
6   -
7   -import javax.annotation.Resource;
8   -
9   -import com.dili.titan.dao.base.BaseDao;
10   -import com.dili.titan.dao.product.ProductSampleDao;
11   -import com.dili.titan.domain.ProductSample;
12   -import com.dili.titan.service.base.BaseServiceImpl;
13   -import com.dili.titan.service.product.ProductSampleService;
14   -import org.springframework.stereotype.Service;
15   -import org.springframework.transaction.annotation.Transactional;
16   -
17   -/**
18   - * ProductSampleService 实现类
19   - * @author dev-center
20   - * @since 2016-09-13
21   - */
22   -@Service("productSampleService")
23   -public class ProductSampleServiceImpl extends BaseServiceImpl<ProductSample,Long> implements ProductSampleService {
24   -
25   - @Resource private ProductSampleDao productSampleDao;
26   -
27   - public BaseDao<ProductSample,Long> getDao() {
28   - return productSampleDao;
29   - }
30   -
31   - @Transactional(rollbackFor=Exception.class)
32   - public int insertEntryCreateId(ProductSample productSample) {
33   - return super.insertEntryCreateId(productSample);
34   - }
35   -}
36 0 \ No newline at end of file
titan-api/src/main/java/com/dili/titan/service/util/CovertUtils.java deleted 100755 → 0
1   -package com.dili.titan.service.util;
2   -
3   -import com.alibaba.fastjson.JSON;
4   -
5   -import java.util.List;
6   -
7   -/**
8   - * <p>Title: 〈标题〉</p>
9   - * <p>Description: 〈描述〉</p>
10   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
11   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
12   - * <B>Company</B> 地利集团
13   - * <p>CreateTime:2015/4/27</p>
14   - *
15   - * @author gongsz
16   - */
17   -public class CovertUtils{
18   - public static <T>List<T> covertEntrtyList(Object o,Class<T> clazz){
19   - if (o == null) {
20   - return null;
21   - }
22   - String jsonTmp = JSON.toJSONString(o);
23   - return JSON.parseArray(jsonTmp, clazz);
24   - }
25   -
26   - public static <T>T covertEntrty(Object o, Class<T> clazz) {
27   - if (o == null) {
28   - return null;
29   - }
30   - String jsonTmp = JSON.toJSONString(o);
31   - return JSON.parseObject(jsonTmp, clazz);
32   - }
33   -}
titan-api/src/main/java/com/dili/titan/service/util/ObjectValidateUtils.java deleted 100755 → 0
1   -package com.dili.titan.service.util;
2   -
3   -import org.apache.commons.lang.StringUtils;
4   -import org.slf4j.Logger;
5   -import org.slf4j.LoggerFactory;
6   -
7   -import java.beans.PropertyDescriptor;
8   -import java.lang.reflect.Method;
9   -
10   -/**
11   - * Created by gsz on 2015/7/25.
12   - */
13   -public class ObjectValidateUtils {
14   - public static final Logger logger = LoggerFactory.getLogger(ObjectValidateUtils.class);
15   -
16   - /**
17   - * 验证必填字段
18   - * @param properties 必填字段名称
19   - * @param obj 验证对象
20   - * @return
21   - */
22   - public static boolean checkRequired(String[] properties, Object obj){
23   - for (String field : properties) {
24   - Object o = null;
25   - try {
26   - PropertyDescriptor pd = new PropertyDescriptor(field, obj.getClass());
27   - Method getMethod = pd.getReadMethod();// 获得get方法
28   - o = getMethod.invoke(obj);
29   - } catch (Exception e) {
30   - logger.error("检查输入参数失败", e);
31   - return false;
32   - }
33   -
34   - if (o == null) {
35   - return false;
36   - }
37   - if(o instanceof String && StringUtils.isEmpty((String)o)){
38   - return false;
39   - }
40   - }
41   - return true;
42   - }
43   -}
titan-api/src/main/java/com/dili/titan/service/util/httpclient/BaseOutput.java deleted 100755 → 0
1   -package com.dili.titan.service.util.httpclient;
2   -
3   -public class BaseOutput<T> {
4   -
5   - protected int code;
6   - protected String result;
7   - protected T data;
8   -
9   - public int getCode() {
10   - return code;
11   - }
12   -
13   - public void setCode(int code) {
14   - this.code = code;
15   - }
16   -
17   - public String getResult() {
18   - return result;
19   - }
20   -
21   - public void setResult(String result) {
22   - this.result = result;
23   - }
24   -
25   - public T getData() {
26   - return data;
27   - }
28   -
29   - public void setData(T data) {
30   - this.data = data;
31   - }
32   -
33   -
34   - public BaseOutput<T> failure(int code, String result) {
35   - this.code = code;
36   - this.result = result;
37   - return this;
38   - }
39   -
40   - public BaseOutput<T> failure(int code) {
41   - this.code = code;
42   - return this;
43   - }
44   -
45   - public BaseOutput<T> failure() {
46   - this.code = 0;
47   - this.result = "调用失败";
48   - return this;
49   - }
50   -
51   - @Override public String toString() {
52   - return "BaseOutput{" +
53   - "code=" + code +
54   - ", result='" + result + '\'' +
55   - ", data=" + data +
56   - '}';
57   - }
58   -}
titan-api/src/main/java/com/dili/titan/service/util/httpclient/HttpClientUtil.java deleted 100755 → 0
1   -package com.dili.titan.service.util.httpclient;
2   -
3   -import com.alibaba.fastjson.JSON;
4   -import com.alibaba.fastjson.TypeReference;
5   -import org.apache.http.HttpResponse;
6   -import org.apache.http.HttpStatus;
7   -import org.apache.http.client.methods.HttpGet;
8   -import org.apache.http.client.utils.DateUtils;
9   -import org.apache.http.util.EntityUtils;
10   -import org.apache.log4j.Logger;
11   -
12   -import java.util.Calendar;
13   -
14   -/**
15   - * <B>Description</B> 与服务端通信,执行请求,返回数据。 <br />
16   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
17   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
18   - * <B>Company</B> 地利集团
19   - * @createTime 2014年5月15日 下午3:24:59
20   - * @author dili-guwenwu
21   - */
22   -public class HttpClientUtil {
23   -
24   - private static Logger logger = Logger.getLogger(HttpClientUtil.class);
25   - private static final String ENCODE = "UTF8";
26   - private static final String dateformat = "yyyy-MM-dd HH:mm:ss ZZZ";
27   -
28   - @SuppressWarnings({ "unchecked", "rawtypes" })
29   - public static <T extends BaseOutput> T excuteGet(String path, T output, TypeReference type) {
30   - try {
31   - HttpGet get = new HttpGet( path);
32   - get.addHeader("Date", DateUtils.formatDate(
33   - Calendar.getInstance().getTime(), dateformat));
34   - get.addHeader("Content-type", "application/json");
35   -// String body = JSON.toJSONString(paramObj);
36   -// StringEntity entity = new StringEntity(body, ENCODE);
37   -// get.setEntity(entity);
38   -
39   - HttpResponse response = BasicHttpClient.getHttpClient().execute(get);
40   - int status = response.getStatusLine().getStatusCode();
41   - if (status == HttpStatus.SC_OK) {
42   - String message = EntityUtils.toString(response.getEntity(), ENCODE);
43   - System.out.println(message);
44   - output = (T) JSON.parseObject(message, type);
45   - } else {
46   - output.failure(status);
47   - }
48   - } catch (Exception e) {
49   - logger.error("Error", e);
50   - output.failure(0, e.getMessage());
51   - }
52   - return output;
53   - }
54   -
55   -// public static void main(String[] args) {
56   -// boolean flag = false;
57   -// String agentUrl="http://orders.diligrp.com/api/applyInfo/confirmAgentSale?id=100000000163";
58   -//// String agentUrl="http://titan.diligrp.com/product/getProductInfo";
59   -// BaseOutput<Integer> output = HttpClientUtil.excuteGet(agentUrl,new BaseOutput<Integer>(),new TypeReference<BaseOutput<Integer>>(){});
60   -// System.out.println(output);
61   -// if(output.getCode()==200 ){
62   -// flag=true;
63   -// }
64   -// System.out.println(flag);
65   -// }
66   -}
titan-api/src/main/java/com/dili/titan/service/validate/ProductPriceUtils.java deleted 100755 → 0
1   -package com.dili.titan.service.validate;
2   -
3   -import com.dili.titan.common.tools.Tools;
4   -import com.dili.titan.rest.domain.output.ProductQuotation;
5   -
6   -import java.util.ArrayList;
7   -import java.util.List;
8   -/**
9   - * <B>Description</B> 商品类工具信息 <br />
10   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
11   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
12   - * <B>Company</B> 地利集团
13   - * @createTime 2014年9月1日 上午11:51:39
14   - * @author yangjianjun
15   - */
16   -public class ProductPriceUtils {
17   -
18   - /**
19   - * this method is 价格区间范围计算
20   - * @param productQuotation
21   - * @return
22   - * @createTime 2014年9月1日 下午11:51:50
23   - * @author yangjianjun
24   - */
25   - public static List<ProductQuotation> getproductQuotation (List<ProductQuotation> productQuotation){
26   - List<ProductQuotation> quotation = new ArrayList<ProductQuotation>();
27   - if(!Tools.checkListNotNull(productQuotation)){
28   - for(int i=0;i<productQuotation.size();i++){
29   - ProductQuotation resultQuotation=new ProductQuotation();
30   - resultQuotation.setId(productQuotation.get(i).getId());
31   - switch (i) {
32   - case 0:
33   - if(productQuotation.size()==1){
34   - resultQuotation.setMinPurchaseScope(productQuotation.get(i).getMinPurchaseScope());
35   -
36   - }else{
37   - resultQuotation.setMaxPurchaseScope(productQuotation.get(1).getMinPurchaseScope()-1);
38   - resultQuotation.setMinPurchaseScope(productQuotation.get(i).getMinPurchaseScope());
39   - }
40   - resultQuotation.setPrice(productQuotation.get(i).getPrice());
41   - break;
42   - case 1:
43   - if(productQuotation.size()==2){
44   - resultQuotation.setMinPurchaseScope(productQuotation.get(i).getMinPurchaseScope());
45   - }else{
46   - resultQuotation.setMaxPurchaseScope(productQuotation.get(2).getMinPurchaseScope()-1);
47   - resultQuotation.setMinPurchaseScope(productQuotation.get(i).getMinPurchaseScope());
48   - }
49   - resultQuotation.setPrice(productQuotation.get(i).getPrice());
50   - break;
51   - default:
52   -// resultQuotation.setMaxPurchaseScope(productQuotation.get(1).getMinPurchaseScope()-1);
53   - resultQuotation.setMinPurchaseScope(productQuotation.get(i).getMinPurchaseScope());
54   - resultQuotation.setPrice(productQuotation.get(i).getPrice());
55   - break;
56   - }
57   - quotation.add(resultQuotation);
58   - }
59   - }
60   - return quotation;
61   - }
62   -
63   - /**
64   - * this method is 获取最小起批量
65   - * @param productQuotation
66   - * @return
67   - * @createTime 2014年9月1日 下午5:37:16
68   - * @author yangjianjun
69   - */
70   - public static Integer getMiniPurchase(List<ProductQuotation> productQuotation){
71   - Integer miniPurchase=0;
72   - if(!Tools.checkListNotNull(productQuotation)){
73   - miniPurchase=productQuotation.get(0).getMinPurchaseScope();
74   - }
75   - return miniPurchase;
76   - }
77   -}
titan-api/src/main/java/com/dili/titan/web/utils/JavaMelodyFilter.java deleted 100755 → 0
1   -package com.dili.titan.web.utils;
2   -
3   -import com.diligrp.website.util.format.DateFormatUtils;
4   -import net.bull.javamelody.MonitoringFilter;
5   -
6   -import javax.servlet.FilterChain;
7   -import javax.servlet.ServletException;
8   -import javax.servlet.ServletRequest;
9   -import javax.servlet.ServletResponse;
10   -import javax.servlet.http.Cookie;
11   -import javax.servlet.http.HttpServletRequest;
12   -import java.io.IOException;
13   -import java.util.Date;
14   -import java.util.HashMap;
15   -import java.util.Map;
16   -
17   -
18   -/**
19   - * <p>Title: 〈标题〉</p>
20   - * <p>Description: 〈描述〉</p>
21   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
22   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
23   - * <B>Company</B> 地利集团
24   - * <p>CreateTime:2015/2/11</p>
25   - *
26   - * @author gongsz
27   - */
28   -public class JavaMelodyFilter extends MonitoringFilter {
29   -
30   - @Override
31   - public void doFilter(ServletRequest request,
32   - ServletResponse response, FilterChain chain)
33   - throws IOException, ServletException {
34   - final HttpServletRequest httpRequest = (HttpServletRequest) request;
35   - String monitoringUrl = getMonitoringUrl(httpRequest);
36   - String currUrl = httpRequest.getRequestURI();
37   - if(monitoringUrl.equals(currUrl)){
38   - Cookie cookie= getCookie("titan_pwd",httpRequest);
39   - String curPwd = DateFormatUtils.format(new Date(), "yyyyMMddHH");
40   - if(cookie!=null && curPwd.equals(cookie.getValue())) {
41   - super.doFilter(request, response, chain);
42   - }
43   - }else {
44   - super.doFilter(request, response, chain);
45   - }
46   - }
47   -
48   - private Cookie getCookie(String name, HttpServletRequest request){
49   - Cookie[] cookies = request.getCookies();
50   - if(cookies.length==0){
51   - return null;
52   - }
53   - Map<String,Cookie> cookieMap = new HashMap<String, Cookie>();
54   - for(Cookie cookie : cookies){
55   - cookieMap.put(cookie.getName(),cookie);
56   - }
57   - return cookieMap.get(name);
58   - }
59   -}
titan-api/src/main/java/com/dili/titan/web/utils/MonitorUtils.java deleted 100755 → 0
1   -package com.dili.titan.web.utils;
2   -
3   -import com.dili.dd.monitor.MonitorLevel;
4   -import com.dili.dd.monitor.MonitorService;
5   -import com.dili.dd.monitor.UserMonitorType;
6   -import org.springframework.beans.factory.annotation.Value;
7   -
8   -/**
9   - * Created by gsz on 2015/9/11.
10   - */
11   -public class MonitorUtils {
12   - private static String monitorKey = "77a705e4221044fa94a7df10fc87cec8";
13   - private static String monitorPK = "107";
14   - private static String monitorFK = "108";
15   - private static String monitorEK = "109";
16   - private static MonitorService service ;
17   - static {
18   - service = MonitorService.getMonitorService(monitorKey);
19   - }
20   -
21   - public static void startMonitor(){
22   - service.startMonitor();
23   - }
24   -
25   - public static void endMonitor(Class clazz,String opName){
26   - service.endMonitor(monitorPK, UserMonitorType.PERFORMANCE, MonitorLevel.LEVEL1,clazz,"新增商品insertPopProduct","");
27   - }
28   -
29   - public static void flowMonitor(Class clazz,String opName){
30   - service.endMonitor(monitorFK, UserMonitorType.FLOW, MonitorLevel.LEVEL1,clazz,opName,"");
31   - }
32   -
33   - public static void errorMonitor(Class clazz,String opName, java.lang.String message){
34   - service.endMonitor(monitorEK, UserMonitorType.ERROR, MonitorLevel.LEVEL1,clazz,opName,message);
35   - }
36   -}
titan-api/src/main/java/com/dili/titan/web/utils/Native2AsciiUtils.java deleted 100755 → 0
1   -package com.dili.titan.web.utils;
2   -
3   -/**
4   - * native2ascii.exe Java code implementation.
5   - *
6   - * @author
7   - * @version 1.0
8   - */
9   -public class Native2AsciiUtils {
10   -
11   - /**
12   - * prefix of ascii string of native character
13   - */
14   - private static String PREFIX = "\\u";
15   -
16   - /**
17   - * Native to ascii string. It's same as execut native2ascii.exe.
18   - *
19   - * @param str native string
20   - * @return ascii string
21   - */
22   - public static String native2Ascii(String str) {
23   - char[] chars = str.toCharArray();
24   - StringBuilder sb = new StringBuilder();
25   - for (int i = 0; i < chars.length; i++) {
26   - sb.append(char2Ascii(chars[i]));
27   - }
28   - return sb.toString();
29   - }
30   -
31   - /**
32   - * Native character to ascii string.
33   - *
34   - * @param c native character
35   - * @return ascii string
36   - */
37   - private static String char2Ascii(char c) {
38   - if (c > 255) {
39   - StringBuilder sb = new StringBuilder();
40   - sb.append(PREFIX);
41   - int code = (c >> 8);
42   - String tmp = Integer.toHexString(code);
43   - if (tmp.length() == 1) {
44   - sb.append("0");
45   - }
46   - sb.append(tmp);
47   - code = (c & 0xFF);
48   - tmp = Integer.toHexString(code);
49   - if (tmp.length() == 1) {
50   - sb.append("0");
51   - }
52   - sb.append(tmp);
53   - return sb.toString();
54   - } else {
55   - return Character.toString(c);
56   - }
57   - }
58   -
59   - /**
60   - * Ascii to native string. It's same as execut native2ascii.exe -reverse.
61   - *
62   - * @param str ascii string
63   - * @return native string
64   - */
65   - public static String ascii2Native(String str) {
66   - StringBuilder sb = new StringBuilder();
67   - int begin = 0;
68   - int index = str.indexOf(PREFIX);
69   - while (index != -1) {
70   - sb.append(str.substring(begin, index));
71   - sb.append(ascii2Char(str.substring(index, index + 6)));
72   - begin = index + 6;
73   - index = str.indexOf(PREFIX, begin);
74   - }
75   - sb.append(str.substring(begin));
76   - return sb.toString();
77   - }
78   -
79   - /**
80   - * Ascii to native character.
81   - *
82   - * @param str ascii string
83   - * @return native character
84   - */
85   - private static char ascii2Char(String str) {
86   - if (str.length() != 6) {
87   - throw new IllegalArgumentException("Ascii string of a native character must be 6 character.");
88   - }
89   - if (!PREFIX.equals(str.substring(0, 2))) {
90   - throw new IllegalArgumentException("Ascii string of a native character must start with \"\\u\".");
91   - }
92   - String tmp = str.substring(2, 4);
93   - int code = Integer.parseInt(tmp, 16) << 8;
94   - tmp = str.substring(4, 6);
95   - code += Integer.parseInt(tmp, 16);
96   - return (char) code;
97   - }
98   -}
titan-api/src/main/java/com/dili/titan/web/utils/SortList.java deleted 100755 → 0
1   -package com.dili.titan.web.utils;
2   -
3   -import java.lang.reflect.Method;
4   -import java.util.Collections;
5   -import java.util.Comparator;
6   -import java.util.List;
7   -
8   -/**
9   - * <B>Description</B> 对象排序 <br />
10   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
11   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
12   - * <B>Company</B> 地利集团
13   - * @param <E>
14   - * @createTime 2014年6月10日 下午8:29:27
15   - * @author yangjianjun
16   - */
17   -public class SortList<E>{
18   - /**
19   - * this method is 对象排序
20   - * @param list list的泛型对象
21   - * @param method 排序的字段<getXXX>
22   - * @param sort 若倒序填写desc;否则填null
23   - * @createTime 2014年6月11日 上午10:00:21
24   - * @author yangjianjun
25   - */
26   - public void sort(List<E> list, final String method, final String sort){
27   - Collections.sort(list, new Comparator() {
28   - public int compare(Object a, Object b) {
29   - int ret = 0;
30   - try{
31   - Method m1 = ((E)a).getClass().getMethod(method, null);
32   - Method m2 = ((E)b).getClass().getMethod(method, null);
33   - if(sort != null && "desc".equals(sort))//倒序
34   - ret = m2.invoke(((E)b), null).toString().compareTo(m1.invoke(((E)a), null).toString());
35   - else//正序
36   - ret = m1.invoke(((E)a), null).toString().compareTo(m2.invoke(((E)b), null).toString());
37   - }catch(Exception ex){
38   - System.out.println(ex);
39   - }
40   - return ret;
41   - }
42   - });
43   - }
44   -}
titan-api/src/main/java/com/dili/titan/web/utils/WebUtils.java deleted 100755 → 0
1   -package com.dili.titan.web.utils;
2   -
3   -import org.apache.commons.lang.StringUtils;
4   -
5   -import java.util.ArrayList;
6   -import java.util.List;
7   -
8   -public class WebUtils {
9   -
10   - private String assetsPath;
11   -
12   - /**
13   - * 获取到资源文件地址
14   - *
15   - * @param file
16   - * @return
17   - */
18   - public String getAssetsPath(String file) {
19   - return assetsPath + file;
20   - }
21   -
22   - public List<String[]> getCrumbsByString(String crumbs) {
23   - if (StringUtils.isEmpty(crumbs)) {
24   - return null;
25   - }
26   - String[] sp = crumbs.split(",");
27   - List<String[]> list = new ArrayList<String[]>();
28   - for (String val : sp) {
29   - String[] url = val.split(":");
30   - list.add(url);
31   - }
32   - return list;
33   - }
34   -
35   - public void setAssetsPath(String assetsPath) {
36   - this.assetsPath = assetsPath;
37   - }
38   -
39   - public int[] pageSplit(int curr, int total, int count) {
40   - int start = Math.max(1, curr - count / 2);
41   - int end = Math.min(total, start + count - 1);
42   - start = Math.max(1, end - count + 1);
43   - return createSplit(start, end);
44   - }
45   -
46   - private int[] createSplit(int start, int end) {
47   - int size = end + 1 - start;
48   - int[] pages = new int[size];
49   - for (int i = 0, j = start; i < size; i++, j++) {
50   - pages[i] = j;
51   - }
52   - return pages;
53   - }
54   -}
titan-api/src/main/java/com/dili/titan/web/ws/attribute/AttributeWebService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.web.ws.attribute;
6   -
7   -import com.alibaba.fastjson.JSON;
8   -import com.dili.titan.common.log.LogHelper;
9   -import com.dili.titan.common.log.LogTypeEnum;
10   -import com.dili.titan.rest.domain.output.AttributeOut;
11   -import com.dili.titan.rest.domain.output.BaseOutput;
12   -import com.dili.titan.web.ws.basews.BaseWebservice;
13   -import com.dili.titan.ws.category.AttributeRestService;
14   -import org.codehaus.jackson.type.TypeReference;
15   -import org.springframework.stereotype.Controller;
16   -import org.springframework.web.bind.annotation.RequestMapping;
17   -import org.springframework.web.bind.annotation.RequestMethod;
18   -import org.springframework.web.bind.annotation.ResponseBody;
19   -
20   -import javax.annotation.Resource;
21   -import javax.servlet.http.HttpServletRequest;
22   -import java.util.HashMap;
23   -
24   -/**
25   - *
26   - * <B>Description</B> 商品认证管理 <br />
27   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
28   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
29   - * <B>Company</B> 地利集团
30   - * @createTime 2014年10月29日 上午11:26:28
31   - * @author yangweidong
32   - */
33   -@Controller
34   -@RequestMapping(value = "/attribute", produces = "application/json; charset=UTF-8")
35   -public class AttributeWebService extends BaseWebservice {
36   - @Resource
37   - private AttributeRestService attributeRestService;
38   -
39   - /**
40   - * 列表展示
41   - * @return
42   - */
43   - @ResponseBody
44   - @RequestMapping(value = "/getAttribute", method = RequestMethod.POST)
45   - public BaseOutput<AttributeOut> listProductAuthInfos(HttpServletRequest request) throws Exception{
46   - long start = System.currentTimeMillis();
47   - BaseOutput<AttributeOut> output = new BaseOutput<AttributeOut>();
48   - try {
49   - HashMap<String, String> param = getParamObject(request, new TypeReference<HashMap<String, String>>() {
50   - });
51   - LogHelper.info(LogTypeEnum.CATEGORY,"调用接口getAttribute参数:{}",param.toString());
52   - String attrId = param.get("attrId");
53   - AttributeOut auths = attributeRestService.findAttrAndValueById(attrId);
54   - output.setData(auths);
55   - } catch (Exception e) {
56   - LogHelper.error(LogTypeEnum.AUTH, e, "调用接口getAttribute异常!耗时:{}",
57   - System.currentTimeMillis() - start);
58   - output.failure(0, e.getMessage());
59   - }
60   - LogHelper.info(LogTypeEnum.AUTH,"调用接口getAttribute成功!返回内容={},耗时:{}",
61   - JSON.toJSONString(output.getData()),System.currentTimeMillis() - start);
62   - return output;
63   - }
64   -
65   -}
titan-api/src/main/java/com/dili/titan/web/ws/auth/AuthWebService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.web.ws.auth;
6   -
7   -import com.alibaba.fastjson.JSON;
8   -import com.dili.titan.common.log.LogHelper;
9   -import com.dili.titan.common.log.LogTypeEnum;
10   -import com.dili.titan.domain.Auth;
11   -import com.dili.titan.rest.domain.output.BaseOutput;
12   -import com.dili.titan.web.ws.basews.BaseWebservice;
13   -import com.dili.titan.ws.auth.AuthRestService;
14   -import org.springframework.stereotype.Controller;
15   -import org.springframework.web.bind.annotation.RequestMapping;
16   -import org.springframework.web.bind.annotation.RequestMethod;
17   -import org.springframework.web.bind.annotation.ResponseBody;
18   -
19   -import javax.annotation.Resource;
20   -import javax.servlet.http.HttpServletRequest;
21   -import java.util.List;
22   -
23   -/**
24   - *
25   - * <B>Description</B> 商品认证管理 <br />
26   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
27   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
28   - * <B>Company</B> 地利集团
29   - * @createTime 2014年10月29日 上午11:26:28
30   - * @author yangweidong
31   - */
32   -@Controller
33   -@RequestMapping(value = "/auth", produces = "application/json; charset=UTF-8")
34   -public class AuthWebService extends BaseWebservice {
35   - @Resource
36   - private AuthRestService authRestService;
37   -
38   - /**
39   - * 列表展示
40   - * @return
41   - */
42   - @ResponseBody
43   - @RequestMapping(value = "/listProductAuthInfos", method = RequestMethod.POST)
44   - public BaseOutput<List<Auth>> listProductAuthInfos(HttpServletRequest request) throws Exception{
45   - long start = System.currentTimeMillis();
46   - BaseOutput<List<Auth>> output = new BaseOutput<List<Auth>>();
47   - try {
48   - Integer scope = Auth.SCOPE_THIRDPARTY_SALE;
49   - List<Auth> auths = authRestService.findNormalAuthByScope(scope);
50   - output.setData(auths);
51   - } catch (Exception e) {
52   - LogHelper.error(LogTypeEnum.AUTH, e, "调用接口listProductAuthInfos异常!耗时:{}",
53   - System.currentTimeMillis() - start);
54   - output.failure(0, e.getMessage());
55   - }
56   - LogHelper.info(LogTypeEnum.AUTH,"调用接口listProductAuthInfos成功!返回内容={},耗时:{}",
57   - JSON.toJSONString(output.getData()),System.currentTimeMillis() - start);
58   - return output;
59   - }
60   -
61   -}
titan-api/src/main/java/com/dili/titan/web/ws/basews/BaseWebservice.java deleted 100755 → 0
1   -package com.dili.titan.web.ws.basews;
2   -
3   -import com.dili.titan.common.exception.TitanError;
4   -import com.dili.titan.common.log.LogHelper;
5   -import org.codehaus.jackson.JsonParseException;
6   -import org.codehaus.jackson.map.DeserializationConfig;
7   -import org.codehaus.jackson.map.JsonMappingException;
8   -import org.codehaus.jackson.map.ObjectMapper;
9   -import org.codehaus.jackson.type.TypeReference;
10   -
11   -import javax.servlet.http.HttpServletRequest;
12   -import java.text.SimpleDateFormat;
13   -
14   -public class BaseWebservice {
15   -
16   - private final static String DARE_FORMAT = "yyyy-MM-dd HH:mm:ss";
17   - private ObjectMapper mapper = new ObjectMapper().configure(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, false);
18   -
19   - /**
20   - * 获取请求中的JSON串,转换为对象
21   - * @param request
22   - * @param valueType
23   - * @return
24   - * @throws TitanError
25   - * @createTime 2014年5月28日 下午3:00:10
26   - * @author celine
27   - */
28   - public <T> T getParamObject(HttpServletRequest request, Class<T> valueType) throws TitanError {
29   - mapper.setDateFormat(new SimpleDateFormat(DARE_FORMAT));
30   - T object = null;
31   - try {
32   - object = mapper.readValue(request.getInputStream(), valueType);
33   - } catch (JsonParseException e) {
34   - LogHelper.error(e,"getParamObject()!Json format error");
35   - throw TitanError.JSON_FORMAT_ERROR;
36   - } catch (JsonMappingException e) {
37   - LogHelper.error(e,"getParamObject()!Json convert error");
38   - throw TitanError.JSON_CONVERT_ERROR;
39   - } catch (Exception e) {
40   - LogHelper.error(e,"getParamObject() error");
41   - throw TitanError.DEFAULT_ERROR;
42   - }
43   - // 输入的参数为空
44   - if (object == null) {
45   - throw TitanError.NULL_PARAM_ERROR;
46   - }
47   - return object;
48   - }
49   -
50   - @SuppressWarnings("unchecked")
51   - public <T> T getParamObject(HttpServletRequest request, TypeReference<T> valueTypeRef) throws TitanError {
52   - T object = null;
53   - mapper.setDateFormat(new SimpleDateFormat(DARE_FORMAT));
54   - try {
55   - object = (T) mapper.readValue(request.getInputStream(), valueTypeRef);
56   - } catch (JsonParseException e) {
57   - LogHelper.error(e,"getParamObject()!Json format error");
58   - throw TitanError.JSON_FORMAT_ERROR;
59   - } catch (JsonMappingException e) {
60   - LogHelper.error(e,"getParamObject()!Json convert error");
61   - throw TitanError.JSON_CONVERT_ERROR;
62   - } catch (Exception e) {
63   - LogHelper.error(e,"getParamObject() error");
64   - throw TitanError.DEFAULT_ERROR;
65   - }
66   - return object;
67   - }
68   -}
titan-api/src/main/java/com/dili/titan/web/ws/basews/IndexController.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.web.ws.basews;
6   -
7   -import org.springframework.stereotype.Controller;
8   -import org.springframework.ui.Model;
9   -import org.springframework.web.bind.annotation.RequestMapping;
10   -import org.springframework.web.bind.annotation.RequestMethod;
11   -import org.springframework.web.servlet.mvc.support.RedirectAttributes;
12   -
13   -
14   -/**
15   - * <B>Description</B>
16   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
17   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
18   - * <B>Company</B> 地利集团
19   - * @createTime 2014年8月14日 下午5:48:44
20   - * @author yangjianjun
21   - */
22   -@Controller
23   -@RequestMapping(value = "/", method = {RequestMethod.GET,RequestMethod.POST})
24   -public class IndexController{
25   -
26   - @RequestMapping(method = {RequestMethod.GET,RequestMethod.POST})
27   - public String index(RedirectAttributes redire,Model view)throws Exception{
28   - redire.addAttribute("param", "FNMLNUYODNF");
29   - view.addAttribute("result", "欢迎进入商品库外部接口系统");
30   - return "/index";
31   - }
32   -
33   -// @RequestMapping(value = "init",method = {RequestMethod.GET,RequestMethod.POST})
34   -// public String init(RedirectAttributes redire,Model view){
35   -// try {
36   -// productRestService.init();
37   -// }catch (Exception e){
38   -// e.printStackTrace();
39   -// return "common/error";
40   -// }
41   -// return "common/success";
42   -// }
43   -}
titan-api/src/main/java/com/dili/titan/web/ws/supplier/SupplierWebservice.java deleted 100755 → 0
1   -package com.dili.titan.web.ws.supplier;
2   -
3   -import com.alibaba.fastjson.JSON;
4   -import com.dili.titan.common.exception.TitanError;
5   -import com.dili.titan.common.log.LogHelper;
6   -import com.dili.titan.common.log.LogTypeEnum;
7   -import com.dili.titan.rest.domain.output.BaseOutput;
8   -import com.dili.titan.web.ws.basews.BaseWebservice;
9   -import org.codehaus.jackson.type.TypeReference;
10   -import org.springframework.stereotype.Service;
11   -import org.springframework.web.bind.annotation.RequestMapping;
12   -import org.springframework.web.bind.annotation.RequestMethod;
13   -import org.springframework.web.bind.annotation.ResponseBody;
14   -
15   -import javax.servlet.http.HttpServletRequest;
16   -import javax.servlet.http.HttpServletResponse;
17   -import java.util.HashMap;
18   -import java.util.Map;
19   -
20   -@Service @RequestMapping(value = "supplier", produces = "application/json; charset=UTF-8")
21   -public class SupplierWebservice extends BaseWebservice {
22   -
23   - /**
24   - * this method is 更新供应商商品的代销量
25   - *
26   - * @param request
27   - * @param response
28   - * @return
29   - * @createTime 2015年3月26日 上午11:54:52
30   - * @author yangjianjun
31   - */
32   - @RequestMapping(value = "/setProductPopGenerationSales", method = RequestMethod.POST) @ResponseBody
33   - public Object setProductPopGenerationSales(HttpServletRequest request, HttpServletResponse response) {
34   - long start = System.currentTimeMillis();
35   - BaseOutput<Object> output = new BaseOutput<Object>();
36   - Map<String, Object> params = null;
37   - try {
38   - params = super.getParamObject(request, new TypeReference<HashMap<String, Object>>() {
39   -
40   - });
41   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口setProductPopGenerationSales参数:{}", JSON.toJSONString(params));
42   - Map<String, Integer> sell = (Map<String, Integer>) (params.get("sells"));
43   - } catch (TitanError e) {
44   - LogHelper.error(LogTypeEnum.PRODUCT, e, "调用接口setProductPopGenerationSales异常!耗时:{}",
45   - System.currentTimeMillis() - start);
46   - return output.failure(e);
47   - }
48   - LogHelper.info(LogTypeEnum.PRODUCT, "调用接口setProductPopGenerationSales成功!返回内容={},耗时:{}",
49   - JSON.toJSONString(output.getData()), System.currentTimeMillis() - start);
50   - return output;
51   - }
52   -
53   -}
titan-api/src/main/java/com/dili/titan/ws/auth/AuthRestService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.auth;
6   -
7   -import com.dili.titan.domain.Auth;
8   -
9   -import java.util.List;
10   -
11   -/**
12   - * AuthService接口
13   - * @author dev-center
14   - * @since 2014-10-29
15   - */
16   -public interface AuthRestService {
17   -
18   - /**
19   - * 根据运营范围查询当前正在生效的认证
20   - * @param scope 运营范围
21   - * @return
22   - */
23   - public List<Auth> findNormalAuthByScope(Integer scope);
24   -}
titan-api/src/main/java/com/dili/titan/ws/auth/impl/AuthRestServiceImpl.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.auth.impl;
6   -
7   -import com.dili.titan.common.datasource.DynamicSource;
8   -import com.dili.titan.dao.AuthDao;
9   -import com.dili.titan.domain.Auth;
10   -import com.dili.titan.ws.auth.AuthRestService;
11   -import org.springframework.stereotype.Service;
12   -
13   -import javax.annotation.Resource;
14   -import java.util.List;
15   -
16   -/**
17   - * AuthService 实现类
18   - *
19   - * @author dev-center
20   - * @since 2014-10-29
21   - */
22   -@Service("authRestService")
23   -@DynamicSource
24   -public class AuthRestServiceImpl implements AuthRestService {
25   -
26   - @Resource
27   - private AuthDao authDao;
28   -
29   - @Override
30   - public List<Auth> findNormalAuthByScope(Integer scope) {
31   - return authDao.findNormalAuthByScope(scope);
32   - }
33   -
34   -}
titan-api/src/main/java/com/dili/titan/ws/category/AttributeRestService.java deleted 100755 → 0
1   -package com.dili.titan.ws.category;
2   -
3   -import com.dili.titan.rest.domain.output.AttributeOut;
4   -import com.dili.titan.rest.domain.output.AttributeValueOut;
5   -
6   -/**
7   - * <p>Title: 〈标题〉</p>
8   - * <p>Description: 〈描述〉</p>
9   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
10   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
11   - * <B>Company</B> 地利集团
12   - * <p>CreateTime:2015/4/13</p>
13   - *
14   - * @author gongsz
15   - */
16   -public interface AttributeRestService {
17   -
18   - /**
19   - * this method is 根据属性ID获取正常状态属性信息(附带值信息)
20   - *
21   - * @param attrId
22   - * @return
23   - * @createTime 2015年3月6日 下午2:26:07
24   - * @author ywd
25   - */
26   - public AttributeOut findAttrAndValueById(String attrId);
27   -
28   - /**
29   - * this method is 根据属性ID获取所有状态属性信息(附带值信息)
30   - *
31   - * @param attrId
32   - * @return
33   - * @createTime 2015年3月6日 下午2:26:07
34   - * @author ywd
35   - */
36   - public AttributeOut findAllAttrAndValueById(String attrId);
37   -
38   -
39   -
40   - /**
41   - * this method is 根据属性ID获取属性信息(不附带值信息)
42   - *
43   - * @param attrId
44   - * @return
45   - * @createTime 2015年3月6日 下午2:26:07
46   - * @author ywd
47   - */
48   - public AttributeOut findAttrById(String attrId);
49   -
50   - /**
51   - * this method is 根据属性值ID获取属性值信息
52   - *
53   - * @param valueId
54   - * @return
55   - * @createTime 2015年3月6日 下午2:26:07
56   - * @author ywd
57   - */
58   - public AttributeValueOut findAttrValueById(String valueId);
59   -
60   -}
titan-api/src/main/java/com/dili/titan/ws/category/CategoryRestService.java deleted 100755 → 0
1   -package com.dili.titan.ws.category;
2   -
3   -import com.dili.titan.rest.domain.output.AttributeOut;
4   -import com.dili.titan.rest.domain.output.CategoryOut;
5   -
6   -import java.util.HashMap;
7   -import java.util.List;
8   -
9   -public interface CategoryRestService {
10   -
11   - /**
12   - * 查询类目下的所有子孙类目
13   - * @param cid 类目id
14   - * @return
15   - * @createTime 2014年5月29日 下午2:42:07
16   - * @author celine
17   - */
18   - public List<CategoryOut> listAll(int cid);
19   -
20   - /**
21   - * 获取类目面包屑
22   - * @param cid
23   - * @return
24   - * @createTime 2014年5月29日 上午11:49:38
25   - * @author celine
26   - */
27   - public List<CategoryOut> listCrumbs(int cid);
28   -
29   -
30   - /**
31   - * 查询类目的下一级子类目
32   - * @param cid 类目ID
33   - * @return
34   - */
35   - public List<CategoryOut> listChildren(int cid);
36   -
37   -
38   -
39   - /**
40   - * this method is 查询类目的所有信息
41   - * @param cid
42   - * @return
43   - * @createTime 2014年9月30日 上午11:32:10
44   - * @author yangjianjun
45   - */
46   - public HashMap<String, List<AttributeOut>> listAttributes(int cid);
47   -
48   - /**
49   - * this method is 查询类目的所有信息
50   - * @param cid
51   - * @return
52   - * @createTime 2014年9月30日 上午11:32:10
53   - * @author yangjianjun
54   - */
55   - public HashMap<String, List<AttributeOut>> listAttributes(int cid,boolean includeDel);
56   -
57   -
58   - /**
59   - * 查询类目信息
60   - * @param cid
61   - * @return
62   - * @createTime 2014年6月6日 下午2:12:00
63   - * @author celine
64   - */
65   - public CategoryOut getCatrgoryInfo(int cid,boolean hasAttribute);
66   -
67   - /**
68   - * 获取类目信息(批量查询)
69   - * @param cids
70   - * @return
71   - * @createTime 2014年6月6日 下午2:12:21
72   - * @author celine
73   - */
74   - public List<CategoryOut> listCategoriesInfo(List<Integer> cids);
75   -
76   - /**
77   - * this method is 根据类目ID判断是否有子类目
78   - * @param cid
79   - * @return
80   - * @createTime 2015年3月24日 上午11:09:00
81   - * @author ywd
82   - */
83   - public boolean hasChildren(int cid);
84   -}
titan-api/src/main/java/com/dili/titan/ws/category/CategorySearchAttrRestService.java deleted 100755 → 0
1   -package com.dili.titan.ws.category;
2   -
3   -import com.dili.titan.domain.CategorySearchAttr;
4   -
5   -import java.util.Map;
6   -
7   -/**
8   - * <p>Title: 〈标题〉</p>
9   - * <p>Description: 〈描述〉</p>
10   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
11   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
12   - * <B>Company</B> 地利集团
13   - * <p>CreateTime:2015/4/14</p>
14   - *
15   - * @author gongsz
16   - */
17   -public interface CategorySearchAttrRestService {
18   -
19   - /**
20   - * 根据分类ID获取可搜索属性
21   - * @param cid
22   - * @return map key 为属性ID 值为 CategorySearchAttr
23   - */
24   - public Map<Long,CategorySearchAttr> findByCid(Integer cid);
25   -}
titan-api/src/main/java/com/dili/titan/ws/category/impl/AttributeRestServiceImpl.java deleted 100755 → 0
1   -package com.dili.titan.ws.category.impl;
2   -
3   -import com.dili.titan.common.datasource.DynamicSource;
4   -import com.dili.titan.common.tools.Tools;
5   -import com.dili.titan.domain.AttributeValue;
6   -import com.dili.titan.rest.domain.output.AttributeOut;
7   -import com.dili.titan.rest.domain.output.AttributeValueOut;
8   -import com.dili.titan.service.category.AttributeService;
9   -import com.dili.titan.service.category.AttributeValueService;
10   -import com.dili.titan.ws.category.AttributeRestService;
11   -import org.apache.commons.collections.CollectionUtils;
12   -import org.springframework.stereotype.Service;
13   -
14   -import javax.annotation.Resource;
15   -import java.util.ArrayList;
16   -import java.util.List;
17   -
18   -/**
19   - * <p>Title: 〈标题〉</p>
20   - * <p>Description: 〈描述〉</p>
21   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
22   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
23   - * <B>Company</B> 地利集团
24   - * <p>CreateTime:2015/4/13</p>
25   - *
26   - * @author gongsz
27   - */
28   -@Service("attributeRestService")
29   -@DynamicSource
30   -public class AttributeRestServiceImpl implements AttributeRestService {
31   - @Resource
32   - private AttributeService attributeService;
33   - @Resource
34   - private AttributeValueService attributeValueService;
35   -
36   - @Override
37   - public AttributeOut findAttrAndValueById(String attrId) {
38   - AttributeOut attr = attributeService.getAttributeOutByAttrId(attrId);
39   - if(attr==null) {
40   - return attr;
41   - }
42   -
43   - if (attr.getRequired() == 0) {
44   - attr.setEnforce(false);
45   - } else {
46   - attr.setEnforce(true);
47   - }
48   - List<AttributeValueOut> values = attributeValueService.getAttributeValueOutsByAttrId(attrId);
49   - List<AttributeValueOut> attributeValueOut = new ArrayList<AttributeValueOut>();
50   - if (!Tools.checkListNotNull(values)) {
51   - for (AttributeValueOut attributeValue : values) {
52   - if (attributeValue.getStatus() == AttributeValueOut.STATUS_NORMAL && attributeValue.getShow() == AttributeValueOut.SHOW) {
53   - attributeValueOut.add(attributeValue);
54   - }
55   - }
56   - if (Tools.objectIsNotNull(attr)) {
57   - attr.setValues(attributeValueOut);
58   - }
59   - }
60   - return attr;
61   - }
62   -
63   - @Override
64   - public AttributeOut findAllAttrAndValueById(String attrId) {
65   - AttributeOut attr = attributeService.getAttributeOutByAttrId(attrId);
66   - if(attr==null) {
67   - return attr;
68   - }
69   - if (attr.getRequired() == 0) {
70   - attr.setEnforce(false);
71   - } else {
72   - attr.setEnforce(true);
73   - }
74   - List<AttributeValueOut> values = attributeValueService.getAttributeValueOutsByAttrId(attrId);
75   - if (!Tools.checkListNotNull(values)) {
76   - attr.setValues(values);
77   - }
78   - return attr;
79   - }
80   -
81   - @Override
82   - public AttributeOut findAttrById(String attrId) {
83   - return attributeService.getAttributeOutByAttrId(attrId);
84   - }
85   -
86   - @Override
87   - public AttributeValueOut findAttrValueById(String valueId) {
88   - AttributeValue value = attributeValueService.selectEntry(Long.parseLong(valueId));
89   - if(value!=null){
90   - List<AttributeValueOut> attributeValueOuts = attributeValueService.getAttributeValueOutsByAttrId(value
91   - .getAttrId().toString());
92   - if(CollectionUtils.isNotEmpty(attributeValueOuts)){
93   - for(AttributeValueOut valueOut : attributeValueOuts){
94   - if(valueOut.getAttValueId()==Long.parseLong(valueId)){
95   - return valueOut;
96   - }
97   - }
98   - }
99   - }
100   - return null;
101   - }
102   -}
titan-api/src/main/java/com/dili/titan/ws/category/impl/CategorySearchAttrRestServiceImpl.java deleted 100755 → 0
1   -package com.dili.titan.ws.category.impl;
2   -
3   -import com.dili.titan.common.datasource.DynamicSource;
4   -import com.dili.titan.domain.CategorySearchAttr;
5   -import com.dili.titan.service.category.CategorySearchAttrService;
6   -import com.dili.titan.ws.category.CategorySearchAttrRestService;
7   -import org.springframework.stereotype.Service;
8   -
9   -import javax.annotation.Resource;
10   -import java.util.Map;
11   -
12   -/**
13   - * <p>Title: 〈标题〉</p>
14   - * <p>Description: 〈描述〉</p>
15   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
16   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
17   - * <B>Company</B> 地利集团
18   - * <p>CreateTime:2015/4/14</p>
19   - *
20   - * @author gongsz
21   - */
22   -@Service("categorySearchAttrRestService")
23   -@DynamicSource
24   -public class CategorySearchAttrRestServiceImpl implements CategorySearchAttrRestService {
25   -
26   - @Resource
27   - private CategorySearchAttrService categorySearchAttrService;
28   -
29   - @Override
30   - public Map<Long,CategorySearchAttr> findByCid(Integer cid) {
31   - return categorySearchAttrService.findByCid(cid);
32   - }
33   -}
titan-api/src/main/java/com/dili/titan/ws/comment/CommentRestService.java deleted 100755 → 0
1   -package com.dili.titan.ws.comment;
2   -
3   -import com.dili.titan.common.exception.TitanError;
4   -import com.dili.titan.domain.ProductComment;
5   -import com.dili.titan.domain.common.Page;
6   -import com.dili.titan.rest.domain.output.Comment;
7   -import com.dili.titan.rest.domain.output.PageOutput;
8   -
9   -import java.util.List;
10   -
11   -public interface CommentRestService {
12   -
13   - /**
14   - * 删除评论
15   - * @param commentId 评论ID
16   - * @return
17   - * @createTime 2014年6月19日 下午7:19:57
18   - */
19   - public int delete(Long commentId);
20   -
21   - /**
22   - * 添加评论
23   - * @param comment
24   - * @return
25   - * @createTime 2014年6月19日 下午7:28:30
26   - */
27   - public int addComment(Comment comment);
28   -
29   - /**
30   - * 按照用户ID查询评论
31   - * @param pageSize
32   - * @return
33   - * @createTime 2014年6月19日 下午7:35:12
34   - */
35   - public PageOutput<List<Comment>> listCommentByUserId(Long buyerUserId,Long sellerUserId, Integer grade,
36   - Integer dateScope, Integer curPage, Integer pageSize) throws TitanError;
37   -
38   - /**
39   - * 根据商品ID查询评论
40   - * @param pid
41   - * @param pageSize
42   - * @return
43   - * @createTime 2014年6月19日 下午7:35:35
44   - */
45   - public Page<ProductComment> listCommentByPid(Long pid, Integer curPage, Integer pageSize) throws TitanError;
46   -
47   - /**
48   - * 根据商品PID获取评论数量
49   - * @param pid
50   - * @return
51   - */
52   - public int countCommentsByPid(Long pid);
53   -}
titan-api/src/main/java/com/dili/titan/ws/comment/ProductCommentRestService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.comment;
6   -
7   -import com.dili.titan.domain.ProductComment;
8   -import com.dili.titan.domain.common.Page;
9   -
10   -/**
11   - * ProductCommentService接口
12   - * @author dev-center
13   - * @since 2014-06-17
14   - */
15   -public interface ProductCommentRestService{
16   -
17   - /**
18   - * 插入评论
19   - * @param
20   - * @return
21   - */
22   - public Integer createProductComment(ProductComment productComment);
23   -
24   -
25   -
26   - /**
27   - * 逻辑删除商品评论,更新状态位(status:1代表正常, -1代表删除)
28   - * @param id
29   - * @return
30   - */
31   - public Integer deleteProductCommentById(Long id);
32   -
33   -
34   -
35   - /**
36   - * 获取用户全部评论
37   - * @param userId
38   - * @param startTime
39   - * @param endTime
40   - * @param page
41   - * @return
42   - */
43   - public Page<ProductComment> listUserComentByUserId(Long buyerUserId,Long sellerUserId,Integer grade, String startTime, String endTime, Page<ProductComment> page);
44   -
45   -
46   -
47   - /**
48   - * 获取商品全部评论
49   - * @param pid
50   - * @param grade 1代表好评,2代表中评,3代表差评
51   - * @param page
52   - * @return
53   - */
54   - public Page<ProductComment> listUserComentByPid(Long pid, Integer grade, Page<ProductComment> page);
55   -
56   -
57   - /**
58   - *查询商品评论总数
59   - * @param pid
60   - * @return
61   - * @createTime 2014年6月26日 下午5:07:40
62   - */
63   - public Integer selectCommentNum(Long pid);
64   -}
titan-api/src/main/java/com/dili/titan/ws/comment/impl/CommentRestServiceImpl.java deleted 100755 → 0
1   -package com.dili.titan.ws.comment.impl;
2   -
3   -import com.alibaba.fastjson.JSON;
4   -import com.dili.titan.common.datasource.DynamicSource;
5   -import com.dili.titan.common.exception.TitanError;
6   -import com.dili.titan.domain.ProductComment;
7   -import com.dili.titan.domain.common.Page;
8   -import com.dili.titan.rest.domain.output.Comment;
9   -import com.dili.titan.rest.domain.output.PageOutput;
10   -import com.dili.titan.ws.comment.CommentRestService;
11   -import com.dili.titan.ws.comment.ProductCommentRestService;
12   -import org.springframework.stereotype.Service;
13   -import org.springframework.transaction.annotation.Transactional;
14   -
15   -import javax.annotation.Resource;
16   -import java.text.SimpleDateFormat;
17   -import java.util.Calendar;
18   -import java.util.List;
19   -
20   -@Service(value = "commentRestService")
21   -@DynamicSource
22   -public class CommentRestServiceImpl implements CommentRestService {
23   -
24   - @Resource
25   - private ProductCommentRestService productCommentRestService;
26   -
27   - @Override
28   - @Transactional
29   - public int delete(Long commentId) {
30   - if (commentId != null) {
31   - return productCommentRestService.deleteProductCommentById(commentId);
32   - }
33   - return 0;
34   - }
35   -
36   - @Override
37   - @Transactional
38   - public int addComment(Comment comment) {
39   - if (comment != null && comment.getComment() != null && comment.getPid() != null && comment.getRate() != null
40   - && comment.getBuyerUserId() != null && comment.getSellerUserId() != null && comment.getDeliveryRate() != null
41   - && comment.getProductRate() != null && comment.getServiceRate() != null) {
42   - String jsonStr = JSON.toJSONString(comment);
43   - ProductComment productComment = JSON.parseObject(jsonStr, ProductComment.class);
44   - productComment.setStatus(ProductComment.STATUS_NEW);
45   - return productCommentRestService.createProductComment(productComment);
46   - }
47   - return 0;
48   - }
49   -
50   - @Override
51   - public PageOutput<List<Comment>> listCommentByUserId(Long buyerUserId,Long sellerUserId, Integer rate,Integer dateScope,
52   - Integer curPage, Integer pageSize) throws TitanError{
53   - if (buyerUserId == null ) {
54   - throw new TitanError(0, "未输入用户ID");
55   - }
56   - if(dateScope == null){
57   - throw new TitanError(0, "传入参数dateScope为空!");
58   - }
59   - Page<ProductComment> page = new Page<ProductComment>();
60   - page.setPageSize(pageSize);
61   - page.setCurrentPage(curPage);
62   - String endTime = "";
63   - String startTime = "";
64   -
65   - Calendar cale = Calendar.getInstance();
66   - SimpleDateFormat dmy_hms = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
67   - switch(dateScope){
68   - case 1: cale.set(Calendar.WEEK_OF_MONTH, cale.get(Calendar.WEEK_OF_MONTH) -1);
69   - startTime = dmy_hms.format(cale.getTime()); break;
70   - case 2: cale.set(Calendar.MONTH, cale.get(Calendar.MONTH) -1);
71   - startTime = dmy_hms.format(cale.getTime()); break;
72   - case 3: cale.set(Calendar.MONTH, cale.get(Calendar.MONTH) -6);
73   - startTime = dmy_hms.format(cale.getTime()); break;
74   - case 4: cale.set(Calendar.MONTH, cale.get(Calendar.MONTH) -6);
75   - endTime = dmy_hms.format(cale.getTime()); break;
76   - case 5: break;
77   - default: throw new TitanError(0, "传入参数dateScope错误!");
78   - }
79   - page = productCommentRestService.listUserComentByUserId(buyerUserId, sellerUserId,rate, startTime, endTime, page);
80   - List<ProductComment> comments = page.getResult();
81   - String jsonStr = JSON.toJSONString(comments);
82   - PageOutput<List<Comment>> commentPage = new PageOutput<List<Comment>>();
83   - commentPage.setCount(page.getTotalCount());
84   - commentPage.setPage(curPage);
85   - commentPage.setPageSize(pageSize);
86   - commentPage.setTotalPage(page.getTotalPage());
87   - commentPage.setData(JSON.parseArray(jsonStr, Comment.class));
88   - return commentPage;
89   -
90   - }
91   -
92   - @Override
93   - public Page<ProductComment> listCommentByPid(Long pid, Integer curPage, Integer pageSize) throws TitanError {
94   - if (pid == null) {
95   - throw new TitanError(0, "未输入商品ID");
96   - }
97   - Page<ProductComment> page = new Page<ProductComment>();
98   - page.setPageSize(pageSize);
99   - page.setCurrentPage(curPage);
100   - return productCommentRestService.listUserComentByPid(pid, null, page);
101   -
102   - }
103   -
104   - @Override
105   - public int countCommentsByPid(Long pid) {
106   - return productCommentRestService.selectCommentNum(pid);
107   - }
108   -}
titan-api/src/main/java/com/dili/titan/ws/comment/impl/ProductCommentRestServiceImpl.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.comment.impl;
6   -
7   -import com.dili.titan.common.datasource.DynamicSource;
8   -import com.dili.titan.common.exception.AppException;
9   -import com.dili.titan.dao.base.BaseDao;
10   -import com.dili.titan.dao.comment.ProductCommentDao;
11   -import com.dili.titan.dao.comment.impl.ProductCommentDaoImpl;
12   -import com.dili.titan.domain.ProductComment;
13   -import com.dili.titan.domain.common.Page;
14   -import com.dili.titan.domain.common.TitanSequence;
15   -import com.dili.titan.ws.comment.ProductCommentRestService;
16   -import org.slf4j.Logger;
17   -import org.slf4j.LoggerFactory;
18   -import org.springframework.stereotype.Service;
19   -import org.springframework.transaction.annotation.Transactional;
20   -
21   -import javax.annotation.Resource;
22   -
23   -/**
24   - * ProductCommentService 实现类
25   - *
26   - * @author dev-center
27   - * @since 2014-06-17
28   - */
29   -@Service("productCommentRestService")
30   -@DynamicSource
31   -public class ProductCommentRestServiceImpl implements ProductCommentRestService {
32   -
33   - protected static final Logger logger = LoggerFactory.getLogger(ProductCommentRestServiceImpl.class);
34   - @Resource
35   - private ProductCommentDaoImpl productCommentDao;
36   -
37   - public BaseDao<ProductComment, Long> getDao() {
38   - return productCommentDao;
39   - }
40   -
41   - @Override
42   - @Transactional
43   - public Integer createProductComment(ProductComment productComment) {
44   - TitanSequence s = productCommentDao.getSequence(ProductCommentDao.QEQUENECE_NAME, 1, Long.MAX_VALUE, 1);
45   - logger.debug("sequence MinValue: " + s.getMinValue());
46   - productComment.setId(s.getMaxValue());
47   - return productCommentDao.insertEntry(productComment);
48   - }
49   -
50   -
51   -
52   - @Override
53   - @Transactional
54   - public Integer deleteProductCommentById(Long id) {
55   - ProductComment productComment = new ProductComment();
56   - productComment.setId(id);
57   - productComment.setStatus(-1);
58   - return productCommentDao.updateByKey(productComment);
59   - }
60   -
61   -
62   -
63   -
64   -
65   - public Page<ProductComment> queryProductCommentPage(ProductComment condtion, Page<ProductComment> page) {
66   - //TODO为什么使用反射?
67   - try {
68   - Class<?> clz = condtion.getClass();
69   - clz.getMethod("setStartIndex", Integer.class).invoke(condtion, page.getStartIndex());
70   - clz.getMethod("setEndIndex", Integer.class).invoke(condtion, page.getEndIndex());
71   - clz.getMethod("setOrderField",String.class).invoke(condtion,"ctime");
72   - clz.getMethod("setOrderFieldType",String.class).invoke(condtion,"DESC");
73   - } catch (Exception e) {
74   - throw new AppException("设置分页参数失败", e);
75   - }
76   - Integer size = productCommentDao.selectEntryListCount(condtion);
77   - if (size == null || size <= 0) {
78   - return page;
79   - }
80   - page.setTotalCount(size);//总记录数
81   - page.setResult(productCommentDao.selectEntryList(condtion));
82   - return page;
83   - }
84   -
85   -
86   -
87   - @Override
88   - public Page<ProductComment> listUserComentByUserId(Long buyerUserId,Long sellerUserId,Integer rate, String startTime, String endTime, Page<ProductComment> page) {
89   - ProductComment productComment = new ProductComment();
90   - productComment.setBuyerUserId(buyerUserId);
91   - productComment.setSellerUserId(sellerUserId);
92   - productComment.setRate(rate);
93   - productComment.setStartTime(startTime);
94   - productComment.setEndTime(endTime);
95   - return queryProductCommentPage(productComment, page);
96   - }
97   -
98   -
99   -
100   - @Override
101   - public Page<ProductComment> listUserComentByPid(Long pid, Integer rate, Page<ProductComment> page) {
102   - ProductComment productComment = new ProductComment();
103   - productComment.setPid(pid);
104   - productComment.setRate(rate);
105   - return queryProductCommentPage(productComment, page);
106   - }
107   - @Override
108   - public Integer selectCommentNum(Long pid) {
109   - ProductComment condition=new ProductComment();
110   - condition.setPid(pid);
111   - return productCommentDao.selectEntryListCount(condition);
112   - }
113   -}
titan-api/src/main/java/com/dili/titan/ws/gq/PresaleRestService.java deleted 100755 → 0
1   -package com.dili.titan.ws.gq;
2   -
3   -import com.dili.titan.domain.common.Page;
4   -import com.dili.titan.rest.domain.input.PpsSearchInput;
5   -import com.dili.titan.rest.domain.input.PresaleInput;
6   -import com.dili.titan.rest.domain.output.BaseOutput;
7   -import com.dili.titan.rest.domain.output.PresaleOut;
8   -
9   -import java.util.List;
10   -
11   -/**
12   - * Created by gsz on 2015/7/25.
13   - */
14   -public interface PresaleRestService {
15   - /**
16   - * 新增预售消息
17   - * @param presaleInput
18   - * @return
19   - */
20   - public BaseOutput<Long> insert(PresaleInput presaleInput)throws Exception;
21   -
22   - /**
23   - * 批量删除预售信息
24   - * @param pids
25   - * @return
26   - */
27   - public BaseOutput<List<Long>> dels(List<Long> pids);
28   -
29   - /**
30   - * 根据预售ID获取预售信息
31   - * @param pids
32   - * @return
33   - */
34   - public BaseOutput<List<PresaleOut>> find(List<Long> pids);
35   -
36   - /**
37   - * 根据搜索条件搜索预售信息
38   - * @param input
39   - * @param page
40   - * @param size
41   - * @return
42   - */
43   - public Page<PresaleOut> search(PpsSearchInput input,Integer page, Integer size);
44   -}
titan-api/src/main/java/com/dili/titan/ws/gq/PurchaseRestService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.gq;
6   -
7   -import com.dili.titan.domain.common.Page;
8   -import com.dili.titan.rest.domain.input.PpsSearchInput;
9   -import com.dili.titan.rest.domain.input.PurchaseInput;
10   -import com.dili.titan.rest.domain.output.BaseOutput;
11   -import com.dili.titan.rest.domain.output.PurchaseOut;
12   -
13   -import java.util.List;
14   -
15   -/**
16   - * PurchaseService接口
17   - * @author dev-center
18   - * @since 2014-12-16
19   - */
20   -public interface PurchaseRestService {
21   - /**
22   - * 新增求购消息
23   - * @param input
24   - * @return
25   - */
26   - public BaseOutput<Long> insert(PurchaseInput input)throws Exception;
27   -
28   - /**
29   - * 批量删除求购信息
30   - * @param pids
31   - * @return
32   - */
33   - public BaseOutput<List<Long>> dels(List<Long> pids);
34   -
35   - /**
36   - * 根据求购ID获取求购信息
37   - * @param pids
38   - * @return
39   - */
40   - public BaseOutput<List<PurchaseOut>> find(List<Long> pids);
41   -
42   - /**
43   - * 根据搜索条件搜索求购信息
44   - * @param input
45   - * @param page
46   - * @param size
47   - * @return
48   - */
49   - public Page<PurchaseOut> search(PpsSearchInput input,Integer page, Integer size);
50   -}
titan-api/src/main/java/com/dili/titan/ws/gq/SupplyRestService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.gq;
6   -
7   -import com.dili.titan.domain.common.Page;
8   -import com.dili.titan.rest.domain.input.PpsSearchInput;
9   -import com.dili.titan.rest.domain.input.SupplyInput;
10   -import com.dili.titan.rest.domain.output.BaseOutput;
11   -import com.dili.titan.rest.domain.output.SupplyOut;
12   -
13   -import java.util.List;
14   -
15   -/**
16   - * <B>Description</B> 供应信息 <br />
17   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
18   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
19   - * <B>Company</B> 地利集团
20   - * @createTime 2014年12月17日 下午4:31:13
21   - * @author ywd
22   - */
23   -public interface SupplyRestService {
24   -
25   - /**
26   - * 新增求购消息
27   - * @param input
28   - * @return
29   - */
30   - public BaseOutput<Long> insert(SupplyInput input)throws Exception;
31   -
32   - /**
33   - * 批量删除求购信息
34   - * @param pids
35   - * @return
36   - */
37   - public BaseOutput<List<Long>> dels(List<Long> pids);
38   -
39   - /**
40   - * 根据求购ID获取求购信息
41   - * @param pids
42   - * @return
43   - */
44   - public BaseOutput<List<SupplyOut>> find(List<Long> pids);
45   -
46   - /**
47   - * 根据搜索条件搜索求购信息
48   - * @param input
49   - * @param page
50   - * @param size
51   - * @return
52   - */
53   - public Page<SupplyOut> search(PpsSearchInput input,Integer page, Integer size);
54   -}
titan-api/src/main/java/com/dili/titan/ws/indexCategory/IndexCategoryRestService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.indexCategory;
6   -
7   -import com.dili.titan.rest.domain.output.BaseOutput;
8   -
9   -/**
10   - * IndexCategoryService接口
11   - * @author dev-center
12   - * @since 2014-12-22
13   - */
14   -public interface IndexCategoryRestService{
15   - /**
16   - * this method is 根据网站类目ID查指数品种名
17   - * @param cid
18   - * @return
19   - * @createTime 2014年12月22日 上午11:38:43
20   - * @author ywd
21   - */
22   - public BaseOutput<String> getIndexName(Long cid);
23   -
24   - /**
25   - * this method is 根据指数品种名查网站类目ID
26   - * @param indexName
27   - * @return
28   - * @createTime 2014年12月22日 上午11:39:21
29   - * @author ywd
30   - */
31   - public BaseOutput<Long> getCategoryByIndex(String indexName);
32   -}
titan-api/src/main/java/com/dili/titan/ws/indexCategory/impl/IndexCategoryRestServiceImpl.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.indexCategory.impl;
6   -
7   -import com.dili.titan.common.datasource.DynamicSource;
8   -import com.dili.titan.dao.IndexCategoryDao;
9   -import com.dili.titan.domain.IndexCategory;
10   -import com.dili.titan.rest.domain.output.BaseOutput;
11   -import com.dili.titan.ws.indexCategory.IndexCategoryRestService;
12   -import org.apache.commons.collections.CollectionUtils;
13   -import org.slf4j.Logger;
14   -import org.slf4j.LoggerFactory;
15   -import org.springframework.stereotype.Service;
16   -
17   -import javax.annotation.Resource;
18   -import java.util.List;
19   -
20   -/**
21   - * IndexCategoryService 实现类
22   - * @author dev-center
23   - * @since 2014-12-22
24   - */
25   -@Service("indexCategoryRestService")
26   -@DynamicSource
27   -public class IndexCategoryRestServiceImpl implements IndexCategoryRestService {
28   -
29   - @Resource
30   - private IndexCategoryDao indexCategoryDao;
31   -
32   - private static final Logger LOGGER = LoggerFactory.getLogger(IndexCategoryRestServiceImpl.class);
33   -
34   - @Override
35   - public BaseOutput<String> getIndexName(Long cid) {
36   - BaseOutput<String> baseOut = new BaseOutput<String>();
37   - IndexCategory ic = new IndexCategory();
38   - ic.setCategoryId(cid);
39   - ic.setStatus(IndexCategory.STATUS_NORMAL);
40   - List<IndexCategory> listIc = indexCategoryDao.selectEntryList(ic);
41   - if(CollectionUtils.isNotEmpty(listIc)){
42   - if(listIc.size() > 1){
43   - LOGGER.error("根据网站类目ID="+cid+"查指数品种名找到多条对应的指数。");
44   - }else{
45   - baseOut.setData(listIc.get(0).getIndexName());
46   - }
47   - }
48   - return baseOut;
49   - }
50   -
51   - @Override
52   - public BaseOutput<Long> getCategoryByIndex(String indexName) {
53   - BaseOutput<Long> baseOut = new BaseOutput<Long>();
54   - IndexCategory ic = new IndexCategory();
55   - ic.setIndexName(indexName);
56   - ic.setStatus(IndexCategory.STATUS_NORMAL);
57   - List<IndexCategory> listIc = indexCategoryDao.selectEntryList(ic);
58   - if(CollectionUtils.isNotEmpty(listIc)){
59   - if(listIc.size() > 1){
60   - LOGGER.error("根据指数品种名IndexName="+indexName+"查网站类目ID找到多条对应的类目ID。");
61   - }else{
62   - baseOut.setData(listIc.get(0).getCategoryId());
63   - }
64   - }
65   - return baseOut;
66   - }
67   -}
titan-api/src/main/java/com/dili/titan/ws/product/ProductAuthRestService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.product;
6   -
7   -import com.dili.titan.domain.ProductAuth;
8   -import com.dili.titan.rest.domain.output.ProductAuthOut;
9   -
10   -import java.util.List;
11   -
12   -/**
13   - * ProductAuthService接口
14   - * @author dev-center
15   - * @since 2014-10-29
16   - */
17   -public interface ProductAuthRestService{
18   -
19   -
20   - /**
21   - * this method is 批量插入数据
22   - * @param list
23   - * @return
24   - * @createTime 2014年11月3日 下午12:01:34
25   - * @author yangweidong
26   - */
27   - public int batchInsert(List<ProductAuth> list);
28   -
29   - /**
30   - * this method is 修改商品的时候,修改商品认证信息
31   - * @param list
32   - * @param pid
33   - * @return
34   - * @createTime 2014年11月3日 下午2:46:28
35   - * @author yangweidong
36   - */
37   - public int updateProductAuths(List<ProductAuth> list, Long pid) throws Exception;
38   -
39   - /**
40   - * this method is 根据pid获取商品认证数据
41   - * @param pid
42   - * @return
43   - * @createTime 2014年11月3日 下午4:54:46
44   - * @author yangweidong
45   - */
46   - public List<ProductAuthOut> getProductAuthsByPid(Long pid);
47   -}
titan-api/src/main/java/com/dili/titan/ws/product/ProductImgRestService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.product;
6   -
7   -import com.dili.titan.domain.ProductImg;
8   -
9   -import java.util.List;
10   -
11   -/**
12   - * ProductImgService接口
13   - * @author dev-center
14   - * @since 2014-05-10
15   - */
16   -public interface ProductImgRestService{
17   -
18   - /**
19   - * 批量插入商品图片
20   - * @param list
21   - * @return
22   - */
23   - public int batchInsert(List<ProductImg> list);
24   -
25   - /**
26   - * 更新商品图片
27   - * @param pid
28   - * @param productImgs(不包含Pid)
29   - * @return
30   - */
31   - public int updateProductImg(Long pid, List<ProductImg> productImgs);
32   -
33   - /**
34   - * 根据pid获取图片
35   - * @param pid
36   - * @return
37   - */
38   - public List<String> findImgByPid(Long pid);
39   -}
titan-api/src/main/java/com/dili/titan/ws/product/ProductRestService.java deleted 100755 → 0
1   -package com.dili.titan.ws.product;
2   -
3   -import com.dili.titan.common.exception.TitanError;
4   -import com.dili.titan.domain.common.Page;
5   -import com.dili.titan.domain.pop.ProductPop;
6   -import com.dili.titan.rest.domain.input.*;
7   -import com.dili.titan.rest.domain.output.*;
8   -
9   -import java.util.List;
10   -import java.util.Map;
11   -
12   -public interface ProductRestService {
13   -
14   - /**
15   - * 添加第三方商品
16   - * @param input
17   - * @return
18   - * @createTime 2014年6月9日 下午2:09:41
19   - * @author celine
20   - */
21   - public Long insertPopProduct(PopProductInput input) throws TitanError;
22   -
23   -
24   - /**
25   - * this method is 根据pid,获取商品信息
26   - * @param pids 商品ID
27   - * @param defindResult 自定义返回结果集
28   - * @param isCludDeleteSku 是否包含删除sku
29   - * @return
30   - * @throws TitanError
31   - * @createTime 2015年3月30日 下午4:03:14
32   - * @author yangwd
33   - */
34   - public List<ProductInfoOut> getProductInfo(List<Long> pids, String[] defindResult,boolean isCludDeleteSku) throws TitanError;
35   -
36   - /**
37   - * 分页获取所有第三方商品(搜索同步使用)
38   - * @param page
39   - * @param pageSize
40   - * @param defindResult
41   - * @return
42   - */
43   - public PageOutput<List<ProductInfoOut>> getAllProductPop(int page,int pageSize,String[] defindResult);
44   -
45   - /**
46   - * 批量获取sku信息
47   - * @param skus 需要查询的sku
48   - * @return 返回 key为sku 值为相应sku商品
49   - */
50   - public Map<String, ProductInfoOut> getSkuInfoMap(List<String> skus);
51   -
52   - /**
53   - * this method is 删除第三方产品信息
54   - * @param pids 产品列表
55   - * @return
56   - * @createTime 2014年6月18日 下午2:57:51
57   - * @author yangjianjun
58   - */
59   - public void delProductInfo(List<Long> pids) throws TitanError;
60   -
61   -
62   - /**
63   - *更新买卖对接商品
64   - * @param input 买卖对接商品信息
65   - * @return
66   - * @throws com.dili.titan.common.exception.TitanError
67   - * @createTime 2014年6月20日 下午5:13:59
68   - */
69   - public Map<String, Boolean> updatePopProduct(PopProductInput input) throws TitanError;
70   -
71   - /**
72   - * this method is 更新第三方商品库的状态信息
73   - * @param status 状态信息
74   - * @param pids 产品id列表
75   - * @param sellerId 卖家ID信息
76   - * @return
77   - * @throws com.dili.titan.common.exception.TitanError
78   - * @createTime 2014年6月19日 上午11:18:27
79   - * @author yangjianjun
80   - */
81   - public int updatePopProductStatus(int status, List<Long> pids, long sellerId)throws TitanError;
82   -
83   - /**
84   - * this method is 自定义第三方商品的分类
85   - * @param pids 产品ID列表
86   - * @param vcid 分类ID
87   - * @return
88   - * @throws com.dili.titan.common.exception.TitanError
89   - * @createTime 2014年6月19日 下午2:14:32
90   - * @author yangjianjun
91   - */
92   - public int setProductVirtualCid(List<Long> pids, long vcid) throws TitanError;
93   -
94   - /**
95   - * 批量查询商品的最新审核记录
96   - * @param pids
97   - * @return
98   - * @createTime 2014年6月17日 上午10:02:18
99   - * @author celine
100   - */
101   - public Map<Long, ProductPopAuditOut> selectPopProductLatestAudit(List<Long> pids);
102   -
103   - /**
104   - * 获取店铺最后发布的num个商品
105   - * @param shopId 店铺ID
106   - * @param num 获取数量
107   - * @return
108   - */
109   - public List<ProductInfoOut> listLatestProduct(Long shopId,Integer num);
110   -
111   - /**
112   - * this method is 获取设置的商品搜索排序
113   - * @return
114   - * @createTime 2014年9月7日 下午3:36:14
115   - * @author chenzhiwei
116   - */
117   - public List<ProductSearchSortOut> getProductSearchSort(Long cid,Integer type);
118   -
119   - /**
120   - * this method is 查询上架自定义类目下的商品总数
121   - * @param vcid
122   - * @return
123   - * @throws com.dili.titan.common.exception.TitanError
124   - * @createTime 2014年6月19日 下午3:59:32
125   - * @author yangjianjun
126   - */
127   - public Long countVirtualCatProducts(long vcid)throws TitanError;
128   -
129   - /**
130   - * 获取商品描述信息
131   - * @param pid
132   - * @return
133   - * @throws TitanError
134   - * @createTime 2015年3月31日 下午5:17:24
135   - * @author yangjianjun
136   - */
137   - public String getProductDesc(Long pid) throws TitanError;
138   -
139   - /**
140   - * 设置商品描述信息
141   - * @param pid
142   - * @return
143   - * @throws TitanError
144   - * @createTime 2015年3月31日 下午5:17:24
145   - * @author yangjianjun
146   - */
147   - public void setProductDesc(Long pid,String desc) throws TitanError;
148   -
149   - /**
150   - * 更新规格报价商品价格
151   - * @param input
152   - * @throws TitanError
153   - */
154   - public void updatePrice(ProductPriceInput input) throws TitanError;
155   -
156   - /**
157   - * 更新区间报价商品价格
158   - *
159   - * @param input
160   - * @throws TitanError
161   - */
162   - public void updateRangePrice(ProductPriceRangInput input) throws TitanError;
163   -
164   - /**
165   - * 更新商品库存
166   - *
167   - * @param input
168   - * @throws TitanError
169   - */
170   - public void updateStock(StockInput input) throws TitanError;
171   -
172   - /**
173   - * this method is 店铺ID商品状态查询分类
174   - * @param shopId
175   - * @param pstatus
176   - * @return
177   - * @throws TitanError
178   - * @createTime 2015年4月20日 下午8:20:32
179   - * @author yjj
180   - */
181   - public Map<Integer, String> getPopProductCategroyByShopId(Integer shopId,Integer pstatus) throws TitanError;
182   -
183   - /**
184   - * this method is 查询用户中心三方商品
185   - * @param input
186   - * @param page
187   - * @param pageSize
188   - * @return
189   - * @throws TitanError
190   - * @createTime 2015年4月21日 上午9:54:05
191   - * @author yjj
192   - */
193   - public Page<ProductInfoOut> searchListPopProducts (PopProductSearchInput input ,Integer page,Integer pageSize) throws TitanError;
194   - /**
195   - * 新增视频
196   - * @param videoInput
197   - * @return
198   - */
199   - public Long insertVideo(VideoInput videoInput);
200   -
201   - /**
202   - *消息统计使用查询待审核商品数量
203   - * @param query
204   - * @return
205   - */
206   - public int getProductPopCount(ProductPop query);
207   -
208   - /**
209   - * 根据店铺ID获取商品数量
210   - * @param shopId
211   - * @return
212   - */
213   - public int getCountByShopId(Long shopId);
214   -
215   - /**
216   - * 获取用户常用分类 按商品数量从多到少排序
217   - * @param userId
218   - * @return
219   - */
220   - public List<CommonCategoryOut> commonCategory(Long userId);
221   -
222   - /**
223   - * 修改商品信息 移动端
224   - */
225   - Map<String, Boolean> updatePop(UpdateProductInput input) throws TitanError;
226   - }
titan-api/src/main/java/com/dili/titan/ws/product/ProductSearchSortRestService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.product;
6   -
7   -import com.dili.titan.domain.ProductSearchSort;
8   -
9   -import java.util.List;
10   -
11   -/**
12   - * ProductSearchSortService接口
13   - * @author dev-center
14   - * @since 2014-09-17
15   - */
16   -public interface ProductSearchSortRestService {
17   -
18   -
19   - /**
20   - * 已经排序了
21   - * @return
22   - */
23   - public List<ProductSearchSort> findProductSearchSorts(Long cid,Integer type);
24   -
25   - /**
26   - * 删除分类下指定的商品
27   - * @return
28   - */
29   - public int deleteProductSearchSort(List<Long> pids);
30   -
31   -}
titan-api/src/main/java/com/dili/titan/ws/product/VideoRestService.java deleted 100755 → 0
1   -package com.dili.titan.ws.product;
2   -
3   -import com.dili.titan.domain.Video;
4   -import com.dili.titan.rest.domain.output.VideoOut;
5   -
6   -import java.util.List;
7   -
8   -/**
9   - * <p>Title: 〈标题〉</p>
10   - * <p>Description: 〈描述〉</p>
11   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
12   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
13   - * <B>Company</B> 地利集团
14   - * <p>CreateTime:2015/4/9</p>
15   - *
16   - * @author gongsz
17   - */
18   -public interface VideoRestService {
19   -
20   - /**
21   - * 根据商品id获取商品视频信息
22   - * @param pid
23   - * @return
24   - */
25   - public VideoOut findVideoByPid(Long pid);
26   -
27   - public int insertEntry(Video video);
28   -
29   - public List<Video> selectEntryList(Video video);
30   -}
titan-api/src/main/java/com/dili/titan/ws/product/impl/ProductAuthRestServiceImpl.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.product.impl;
6   -
7   -import com.dili.titan.domain.ProductAuth;
8   -import com.dili.titan.rest.domain.output.ProductAuthOut;
9   -import com.dili.titan.service.auth.ProductAuthService;
10   -import com.dili.titan.service.util.CovertUtils;
11   -import com.dili.titan.ws.product.ProductAuthRestService;
12   -import org.apache.commons.collections.CollectionUtils;
13   -import org.springframework.stereotype.Service;
14   -import org.springframework.transaction.annotation.Transactional;
15   -
16   -import javax.annotation.Resource;
17   -import java.util.List;
18   -
19   -/**
20   - * ProductAuthService 实现类
21   - * @author dev-center
22   - * @since 2014-10-29
23   - */
24   -@Service("productAuthRestService")
25   -public class ProductAuthRestServiceImpl implements ProductAuthRestService {
26   -
27   - @Resource private ProductAuthService productAuthService;
28   -
29   - @Transactional
30   - public int batchInsert(List<ProductAuth> list) {
31   - if(CollectionUtils.isEmpty(list)){
32   - return 0;
33   - }
34   - return productAuthService.batchInsert(list);
35   - }
36   -
37   - @Transactional
38   - public int updateProductAuths(List<ProductAuth> allList, Long pid) throws Exception {
39   - return productAuthService.updateProductAuths(allList,pid);
40   - }
41   -
42   - @Override
43   - public List<ProductAuthOut> getProductAuthsByPid(Long pid){
44   - List<ProductAuth> authList = productAuthService.getProductAuthsByPid(pid);
45   - return CovertUtils.covertEntrtyList(authList, ProductAuthOut.class);
46   - }
47   -}
titan-api/src/main/java/com/dili/titan/ws/product/impl/ProductImgRestServiceImpl.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.product.impl;
6   -
7   -import com.dili.titan.common.datasource.DynamicSource;
8   -import com.dili.titan.domain.ProductImg;
9   -import com.dili.titan.service.product.ProductImgService;
10   -import com.dili.titan.ws.product.ProductImgRestService;
11   -import org.springframework.stereotype.Service;
12   -import org.springframework.transaction.annotation.Transactional;
13   -
14   -import javax.annotation.Resource;
15   -import java.util.List;
16   -
17   -/**
18   - * ProductImgService 实现类
19   - * @author dev-center
20   - * @since 2014-05-10
21   - */
22   -@Service("productImgRestService")
23   -@DynamicSource
24   -public class ProductImgRestServiceImpl implements ProductImgRestService {
25   -
26   - @Resource private ProductImgService productImgService;
27   -
28   - @Override
29   - @Transactional
30   - public int batchInsert(List<ProductImg> list) {
31   - return productImgService.batchInsert(list);
32   - }
33   -
34   - @Override
35   - @Transactional(rollbackFor=Exception.class)
36   - public int updateProductImg(Long pid, List<ProductImg> productImgs) {
37   - return productImgService.updateProductImg(pid,productImgs);
38   - }
39   -
40   - @Override
41   - public List<String> findImgByPid(Long pid) {
42   - return productImgService.findImgByPid(pid);
43   - }
44   -}
titan-api/src/main/java/com/dili/titan/ws/product/impl/ProductSearchSortServiceRestImpl.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.product.impl;
6   -
7   -import com.dili.titan.common.datasource.DynamicSource;
8   -import com.dili.titan.dao.product.ProductSearchSortDao;
9   -import com.dili.titan.domain.ProductSearchSort;
10   -import com.dili.titan.ws.product.ProductSearchSortRestService;
11   -
12   -import org.springframework.stereotype.Service;
13   -
14   -import javax.annotation.Resource;
15   -
16   -import java.util.List;
17   -
18   -/**
19   - * ProductSearchSortService 实现类
20   - * @author dev-center
21   - * @since 2014-09-17
22   - */
23   -@Service("productSearchSortRestService")
24   -@DynamicSource
25   -public class ProductSearchSortServiceRestImpl implements ProductSearchSortRestService {
26   -
27   - @Resource private ProductSearchSortDao productSearchSortDao;
28   -
29   - @Override
30   - public List<ProductSearchSort> findProductSearchSorts(Long cid, Integer type) {
31   - ProductSearchSort productSearchSort = new ProductSearchSort();
32   - productSearchSort.setType(type);
33   - productSearchSort.setCateId(cid.longValue());
34   - productSearchSort.setOrderField("search_sort");
35   - return productSearchSortDao.selectEntryList(productSearchSort);
36   - }
37   -
38   - @Override
39   - public int deleteProductSearchSort(List<Long> pids) {
40   - return productSearchSortDao.deleteProductSearchSortByPids(pids);
41   - }
42   -}
titan-api/src/main/java/com/dili/titan/ws/product/impl/ProductVideoRestServiceImpl.java deleted 100755 → 0
1   -package com.dili.titan.ws.product.impl;
2   -
3   -import com.dili.titan.dao.product.ProductVideoDao;
4   -import com.dili.titan.domain.ProductVideo;
5   -import com.dili.titan.ws.product.ProductVideoRestService;
6   -import org.springframework.stereotype.Service;
7   -
8   -import javax.annotation.Resource;
9   -
10   -/**
11   - * Created by gsz on 2015/5/28.
12   - */
13   -@Service
14   -public class ProductVideoRestServiceImpl implements ProductVideoRestService {
15   - @Resource
16   - private ProductVideoDao productVideoDao;
17   - @Override
18   - public void insertEntry(ProductVideo video) {
19   - productVideoDao.insertEntry(video);
20   - }
21   -}
titan-api/src/main/java/com/dili/titan/ws/product/impl/VideoRestServiceImpl.java deleted 100755 → 0
1   -package com.dili.titan.ws.product.impl;
2   -
3   -import com.dili.titan.common.datasource.DynamicSource;
4   -import com.dili.titan.domain.Video;
5   -import com.dili.titan.rest.domain.output.VideoOut;
6   -import com.dili.titan.service.util.CovertUtils;
7   -import com.dili.titan.service.video.VideoService;
8   -import com.dili.titan.ws.product.VideoRestService;
9   -import org.springframework.stereotype.Service;
10   -
11   -import javax.annotation.Resource;
12   -import java.util.List;
13   -
14   -/**
15   - * <p>Title: 〈标题〉</p>
16   - * <p>Description: 〈描述〉</p>
17   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
18   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
19   - * <B>Company</B> 地利集团
20   - * <p>CreateTime:2015/4/9</p>
21   - *
22   - * @author gongsz
23   - */
24   -@DynamicSource
25   -@Service
26   -public class VideoRestServiceImpl implements VideoRestService {
27   -
28   - @Resource
29   - private VideoService videoService;
30   -
31   - @Override
32   - public VideoOut findVideoByPid(Long pid) {
33   - Video video = videoService.findVideoByPid(pid);
34   - return CovertUtils.covertEntrty(video, VideoOut.class);
35   - }
36   -
37   - @Override
38   - public int insertEntry(Video video) {
39   - return videoService.insertEntry(video);
40   - }
41   -
42   - @Override
43   - public List<Video> selectEntryList(Video video) {
44   - return videoService.selectEntryList(video);
45   - }
46   -}
titan-api/src/main/java/com/dili/titan/ws/product/pop/ProductPopAttrRestService.java deleted 100755 → 0
1   -package com.dili.titan.ws.product.pop;
2   -
3   -import com.dili.titan.domain.pop.ProductPopAttr;
4   -import com.dili.titan.rest.domain.output.AttributeOut;
5   -
6   -import java.util.List;
7   -import java.util.Map;
8   -
9   -public interface ProductPopAttrRestService{
10   -
11   - /**
12   - * 批量新增属性
13   - * @param attrList
14   - */
15   - public void batchInsert(List<ProductPopAttr> attrList);
16   -
17   - /**
18   - * 根据供应商商品Id获取供应商商品属性(附带属性值查询)
19   - *
20   - * @param pid
21   - * @return 返回描述属性和销售属性
22   - */
23   - public Map<String, List<AttributeOut>> findByPid(Long pid,Integer cid);
24   -
25   - /**
26   - * 根据商品ID删除商品属性
27   - * @param pid
28   - */
29   - public void deleteByPid(Long pid);
30   -}
titan-api/src/main/java/com/dili/titan/ws/product/pop/ProductPopAttrValueRestService.java deleted 100755 → 0
1   -package com.dili.titan.ws.product.pop;
2   -
3   -import com.dili.titan.domain.ProductAttrValue;
4   -
5   -import java.util.List;
6   -
7   -public interface ProductPopAttrValueRestService{
8   -
9   - /**
10   - * 根据商品ID删除属性值
11   - * @param pid 商品ID
12   - * @return
13   - * @createTime 2014年6月13日 下午5:08:17
14   - * @author celine
15   - */
16   - public int deleteByPid(Long pid);
17   -
18   - /**
19   - * 批量插入属性值
20   - * @param list
21   - * @return
22   - * @createTime 2014年6月13日 下午5:08:45
23   - * @author celine
24   - */
25   - public int batchInsert(List<ProductAttrValue> list);
26   -}
titan-api/src/main/java/com/dili/titan/ws/product/pop/ProductPopPriceRangeRestService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.product.pop;
6   -
7   -import com.dili.titan.common.exception.TitanError;
8   -import com.dili.titan.domain.pop.ProductPopPriceRange;
9   -
10   -import java.util.List;
11   -
12   -/**
13   - * <B>Description</B> 询价报价服务<br />
14   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
15   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
16   - * <B>Company</B> 地利集团
17   - * @createTime 2014年8月27日 下午5:53:02
18   - * @author yangjianjun
19   - */
20   -public interface ProductPopPriceRangeRestService{
21   - /**
22   - * this method is 批量新增报价信息
23   - * @param priceRangeList
24   - * @throws TitanError
25   - * @createTime 2014年8月27日 下午5:53:48
26   - * @author yangjianjun
27   - */
28   - public void batchInsertPriceRange(List<ProductPopPriceRange> priceRangeList) throws TitanError;
29   - /**
30   - * this method is 批量修改报价信息
31   - * @param priceRangeList
32   - * @throws TitanError
33   - * @createTime 2014年8月27日 下午5:53:48
34   - * @author yangjianjun
35   - */
36   - public void batchUpdatePriceRange(List<ProductPopPriceRange> priceRangeList) throws TitanError;
37   - /**
38   - * this method is 获取价格区间信息
39   - * @param pid
40   - * @return
41   - * @createTime 2014年8月29日 下午3:06:01
42   - * @author yangjianjun
43   - */
44   - List<ProductPopPriceRange> getPopPriceRange(Long pid);
45   -
46   - /**
47   - * this method is 区间信息
48   - * @param pid
49   - * @return
50   - * @createTime 2015年4月17日 上午11:50:05
51   - * @author yangjianjun
52   - */
53   - ProductPopPriceRange selectEntry(Long pid);
54   -
55   - /**
56   - * this method is 更新
57   - * @param productPopPriceRange
58   - * @return
59   - * @createTime 2015年4月17日 上午11:53:16
60   - * @author yangjianjun
61   - */
62   - int updateByKey(ProductPopPriceRange productPopPriceRange);
63   -}
titan-api/src/main/java/com/dili/titan/ws/product/pop/ProductPopRestService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.product.pop;
6   -
7   -import com.dili.titan.common.exception.TitanError;
8   -import com.dili.titan.domain.common.Page;
9   -import com.dili.titan.domain.common.TitanSequence;
10   -import com.dili.titan.domain.pop.ProductPop;
11   -import com.dili.titan.domain.pop.ProductPopAudit;
12   -import com.dili.titan.rest.domain.input.PopProductSearchInput;
13   -
14   -import java.util.List;
15   -import java.util.Map;
16   -
17   -/**
18   - * ProductPopService接口
19   - *
20   - * @author dev-center
21   - * @since 2014-05-10
22   - */
23   -public interface ProductPopRestService {
24   -
25   - /**
26   - * 新增第三方商品
27   - * @param productPop
28   - */
29   - public void insert(ProductPop productPop);
30   -
31   - /**
32   - * 查询第三方商品
33   - * @param condition
34   - * @return
35   - */
36   - public List<ProductPop> selectEntryList(ProductPop condition);
37   -
38   - /**
39   - * 更新第三方商品
40   - * @param updatePop
41   - */
42   - public void updateByKey(ProductPop updatePop);
43   -
44   - /**
45   - * 获取买卖对接商品ID
46   - * @param step
47   - * @return
48   - * @createTime 2014年6月11日 下午7:27:56
49   - * @author celine
50   - */
51   - public TitanSequence getSequence(int step);
52   -
53   - /**
54   - *
55   - * 查询商品的最新审核记录
56   - * @param pids
57   - * @return
58   - * @createTime 2014年6月17日 上午10:05:25
59   - * @author celine
60   - */
61   - public Map<Long, ProductPopAudit> latestAuditHistory(List<Long> pids);
62   -
63   - /**
64   - * this method is 删除第三方产品信息
65   - * @param pids
66   - * @return
67   - * @createTime 2014年6月18日 下午3:06:55
68   - * @author yangjianjun
69   - */
70   - public int delProductInfo(List<Long> pids) throws TitanError;
71   - /**
72   - * this method is 更新第三方商品库的状态信息
73   - * @param status 状态信息
74   - * @param pids 产品id列表
75   - * @param sellerId 卖家ID信息
76   - * @return
77   - * @throws com.dili.titan.common.exception.TitanError
78   - * @createTime 2014年6月19日 上午11:18:27
79   - * @author yangjianjun
80   - */
81   - public int updatePopProductStatus(int status, List<Long> pids, long sellerId)throws TitanError;
82   -
83   - /**
84   - * this method is 自定义第三方商品的分类
85   - * @param pids 产品ID列表
86   - * @param vcid 分类ID
87   - * @return
88   - * @throws com.dili.titan.common.exception.TitanError
89   - * @createTime 2014年6月19日 下午2:14:32
90   - * @author yangjianjun
91   - */
92   - public int setProductVirtualCid(List<Long> pids, long vcid) throws TitanError;
93   -
94   - /**
95   - * this method is 查询上架自定义类目下的商品总数
96   - * @param vcid
97   - * @return
98   - * @throws com.dili.titan.common.exception.TitanError
99   - * @createTime 2014年6月19日 下午3:59:32
100   - * @author yangjianjun
101   - */
102   - public Long countVirtualCatProducts(long vcid)throws TitanError;
103   -
104   - /**
105   - * 根据商品编号获取第三方商品
106   - * @param pid
107   - * @return
108   - */
109   - public ProductPop findByPid(Long pid);
110   -
111   - /**
112   - * 获取店铺最后发布的num个商品ID
113   - *
114   - * @param shopId 店铺ID
115   - * @param num 获取数量
116   - * @return
117   - */
118   - public List<Long> listLatestProductId(Long shopId, Integer num);
119   -
120   - /**
121   - * this method is 店铺ID及商品状态获取类目ID列表
122   - * @param shopId
123   - * @param pstatus
124   - * @return
125   - * @throws TitanError
126   - * @createTime 2015年4月20日 下午8:23:04
127   - * @author yjj
128   - */
129   - public List<Integer> getPopProductCategroyByShopId(Integer shopId,Integer pstatus) throws TitanError;
130   -
131   -
132   - /**
133   - * this method is 获取用户中心商品信息
134   - * @param input
135   - * @param page
136   - * @return
137   - * @throws TitanError
138   - * @createTime 2015年4月21日 上午11:22:00
139   - * @author yjj
140   - */
141   - public List<Long> searchListPopProducts(PopProductSearchInput input,Page<PopProductSearchInput> page) throws TitanError;
142   -
143   - /**
144   - * 分页获取正常状态商品
145   - * @param page
146   - * @param pageSize
147   - * @return
148   - */
149   - public Page<ProductPop> findAllProdut(int page,int pageSize);
150   -
151   - /**
152   - * 对第三方商品,进行审核
153   - * @param productPopAudit
154   - * @return
155   - * @createTime 2014年6月7日 下午3:16:28
156   - * @author celine
157   - */
158   - public void audit(ProductPopAudit productPopAudit);
159   -
160   - /**
161   - *消息统计使用查询待审核商品数量
162   - * @param productPop
163   - * @return
164   - */
165   - public Integer findProductCount(ProductPop productPop);
166   -
167   - /**
168   - * 根据店铺ID获取商品数量
169   - * @param shopId
170   - * @return
171   - */
172   - public int getCountByShopId(Long shopId);
173   -
174   - /**
175   - * 获取用户常用分类Id 按商品数量从多到少排序
176   - * @param userId
177   - * @return
178   - */
179   - public List<Integer> getCommonCateIds(Long userId);
180   -
181   - /**
182   - * 根据商品ID获取类目
183   - * @param pids
184   - * @return
185   - */
186   - public List<Integer> getCateIdByPids(List<Long> pids);
187   -}
titan-api/src/main/java/com/dili/titan/ws/product/pop/ProductSkuPopRestService.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.product.pop;
6   -
7   -import com.dili.titan.common.exception.TitanError;
8   -import com.dili.titan.domain.pop.ProductSkuPop;
9   -import com.dili.titan.rest.domain.output.SkuOut;
10   -import com.dili.titan.service.base.ProductSkuService;
11   -
12   -import java.util.List;
13   -
14   -/**
15   - * ProductSkuPopService接口
16   - * @author dev-center
17   - * @since 2014-05-10
18   - */
19   -public interface ProductSkuPopRestService extends ProductSkuService<ProductSkuPop>{
20   -
21   - /**
22   - * 批量新增sku,如果sku已经存在(前提是处于删除状态),则同时更新版本号
23   - * @author xiaoyang@diligrp.com 2014年6月11日
24   - *
25   - * @param skuList 待新增sku列表,使用数据库自增id
26   - * @throws TitanError skuList为空、sku串不存在、sku串在数据库中已存在并且处于正常状态
27   - */
28   - public void batchInsertSku(List<ProductSkuPop> skuList) throws TitanError;
29   -
30   - /**
31   - * 批量更新sku,更新时同时更新版本号,并且插入快照表
32   - *
33   - * @author xiaoyang@diligrp.com 2014年6月11日
34   - *
35   - * @param skuList 待更新的sku列表,未发生变化的sku不会被写入数据库,快照表中也不会有变化
36   - */
37   - public void batchUpdateSku(List<ProductSkuPop> skuList) throws TitanError;
38   -
39   - /**
40   - * 批量删除sku,逻辑删除
41   - * @author xiaoyang@diligrp.com 2014年6月11日
42   - *
43   - * @param skuList
44   - */
45   - public void batchDeleteSku(List<ProductSkuPop> skuList) throws TitanError;
46   -
47   - /**
48   - * 不论版本,返回当前最新sku
49   - * @author xiaoyang@diligrp.com 2014年6月14日
50   - *
51   - * @param skus
52   - * @param isCludDelete 是否包含删除sku
53   - * @return
54   - */
55   - public List<ProductSkuPop> findSku(List<String> skus,boolean isCludDelete);
56   -
57   - /**
58   - * 查询单个sku
59   - *
60   - * @param sku
61   - * @param isCludDelete 是否包含删除sku
62   - * @return
63   - */
64   - public SkuOut findSingleSku(String sku, boolean isCludDelete);
65   -}
titan-api/src/main/java/com/dili/titan/ws/product/pop/impl/ProductPopAttrRestServiceImpl.java deleted 100755 → 0
1   -package com.dili.titan.ws.product.pop.impl;
2   -
3   -import com.alibaba.fastjson.JSON;
4   -import com.dili.titan.common.datasource.DynamicSource;
5   -import com.dili.titan.dao.product.pop.ProductPopAttrDao;
6   -import com.dili.titan.domain.CategorySearchAttr;
7   -import com.dili.titan.domain.pop.ProductPopAttr;
8   -import com.dili.titan.domain.pop.ProductPopAttrValue;
9   -import com.dili.titan.rest.domain.output.AttributeOut;
10   -import com.dili.titan.rest.domain.output.AttributeValueOut;
11   -import com.dili.titan.service.product.ProductPopAttrService;
12   -import com.dili.titan.ws.category.AttributeRestService;
13   -import com.dili.titan.ws.category.CategorySearchAttrRestService;
14   -import com.dili.titan.ws.product.pop.ProductPopAttrRestService;
15   -import org.apache.commons.collections.CollectionUtils;
16   -import org.springframework.stereotype.Service;
17   -import org.springframework.transaction.annotation.Transactional;
18   -
19   -import javax.annotation.Resource;
20   -import java.util.ArrayList;
21   -import java.util.HashMap;
22   -import java.util.List;
23   -import java.util.Map;
24   -
25   -/**
26   - * <p>Title: 〈标题〉</p>
27   - * <p>Description: 〈描述〉</p>
28   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
29   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
30   - * <B>Company</B> 地利集团
31   - * <p>CreateTime:2015/4/7</p>
32   - *
33   - * @author gongsz
34   - */
35   -@Service("productPopAttrRestService")
36   -@DynamicSource
37   -public class ProductPopAttrRestServiceImpl implements ProductPopAttrRestService {
38   - @Resource
39   - private ProductPopAttrDao productPopAttrDao;
40   - @Resource
41   - private AttributeRestService attributeRestService;
42   - @Resource
43   - private ProductPopAttrService productPopAttrService;
44   - @Resource
45   - private CategorySearchAttrRestService categorySearchAttrRestService;
46   -
47   - @Override
48   - @Transactional
49   - public void batchInsert(List<ProductPopAttr> attrList) {
50   - if(CollectionUtils.isEmpty(attrList)){
51   - return;
52   - }
53   - productPopAttrDao.batchInsert(attrList);
54   - }
55   -
56   - @Override
57   - public Map<String, List<AttributeOut>> findByPid(Long pid,Integer cid) {
58   - //获取商品属性
59   - List<ProductPopAttr> productPopAttrList = productPopAttrService.findByPid(pid);
60   - //获取销售属性和描述属性
61   - Map<String, List<AttributeOut>> resultMap = getAttr(productPopAttrList);
62   - //获取可搜索属性
63   - List<AttributeOut> searchAttrs = new ArrayList<AttributeOut>();
64   - if (resultMap.size() <= 0) {
65   - return resultMap;
66   - }
67   - searchAttrs.addAll(resultMap.get("saleAttrs"));
68   - if (CollectionUtils.isNotEmpty(searchAttrs)) {
69   - //获取分类下的可搜索属性
70   - Map<Long, CategorySearchAttr> searchAttrMap = categorySearchAttrRestService.findByCid(cid);
71   - for (int i = searchAttrs.size() - 1; i >= 0; i--) {
72   - if (!searchAttrMap.containsKey(searchAttrs.get(i).getAttId())) {
73   - searchAttrs.remove(i);
74   - }
75   - }
76   - resultMap.put("searchAttrs", searchAttrs);
77   - }
78   - return resultMap;
79   - }
80   -
81   - /**
82   - * 获取销售描述属性
83   - *
84   - * @param productPopAttrList
85   - * @return
86   - */
87   - private Map<String, List<AttributeOut>> getAttr(List<ProductPopAttr> productPopAttrList) {
88   - Map<String, List<AttributeOut>> resultMap = new HashMap<String, List<AttributeOut>>();
89   - if (CollectionUtils.isEmpty(productPopAttrList)) {
90   - return resultMap;
91   - }
92   - List<AttributeOut> saleAttrs = new ArrayList<AttributeOut>();
93   - List<AttributeOut> descAttrs = new ArrayList<AttributeOut>();
94   - for (ProductPopAttr popAttr : productPopAttrList) {
95   - AttributeOut attributeOut = attributeRestService.findAllAttrAndValueById(popAttr.getAttrId().toString());
96   - if(attributeOut != null){
97   - if (attributeOut.getSaleType().equals(AttributeOut.SALETYPE_SALE)) {
98   - saleAttrs.add(attributeOut);
99   - } else {
100   - descAttrs.add(attributeOut);
101   - }
102   -
103   - //过滤属性值只保留商品属性选中的值
104   - if (attributeOut.getType().equals(AttributeOut.INPUT_TYPE_TEXT) || attributeOut.getType()
105   - .equals(AttributeOut.INPUT_TYPE_TEXT_AREA)) {
106   - String jsonTemp = JSON.toJSONString(popAttr.getAttrValueList());
107   - List<AttributeValueOut> valueOutList = JSON.parseArray(jsonTemp, AttributeValueOut.class);
108   - attributeOut.setValues(valueOutList);
109   - continue;
110   - }
111   - List<AttributeValueOut> valueOutList = attributeOut.getValues();
112   - Map<Long, ProductPopAttrValue> valueMap = popAttr.getValueMap();
113   - for (int i = valueOutList.size() - 1; i >= 0; i--) {
114   - if (!valueMap.containsKey(valueOutList.get(i).getAttValueId())) {
115   - valueOutList.remove(i);
116   - }
117   - }
118   - }
119   - }
120   - resultMap.put("saleAttrs", saleAttrs);
121   - resultMap.put("descAttrs", descAttrs);
122   - return resultMap;
123   - }
124   -
125   - @Override
126   - @Transactional
127   - public void deleteByPid(Long pid) {
128   - productPopAttrDao.deleteByPid(pid);
129   - }
130   -}
titan-api/src/main/java/com/dili/titan/ws/product/pop/impl/ProductPopAttrValueRestServiceImpl.java deleted 100755 → 0
1   -package com.dili.titan.ws.product.pop.impl;
2   -
3   -import com.dili.titan.common.datasource.DynamicSource;
4   -import com.dili.titan.dao.product.pop.ProductPopAttrValueDao;
5   -import com.dili.titan.domain.ProductAttrValue;
6   -import com.dili.titan.ws.product.pop.ProductPopAttrValueRestService;
7   -import org.apache.commons.collections.CollectionUtils;
8   -import org.springframework.stereotype.Service;
9   -import org.springframework.transaction.annotation.Transactional;
10   -
11   -import javax.annotation.Resource;
12   -import java.util.List;
13   -
14   -/**
15   - * <p>Title: 〈标题〉</p>
16   - * <p>Description: 〈描述〉</p>
17   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
18   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
19   - * <B>Company</B> 地利集团
20   - * <p>CreateTime:2015/4/9</p>
21   - *
22   - * @author gongsz
23   - */
24   -@Service("productPopAttrValueRestService")
25   -@DynamicSource
26   -public class ProductPopAttrValueRestServiceImpl implements ProductPopAttrValueRestService {
27   -
28   - @Resource
29   - private ProductPopAttrValueDao productPopAttrValueDao;
30   -
31   - @Override
32   - @Transactional
33   - public int deleteByPid(Long pid) {
34   - return productPopAttrValueDao.deleteByPid(pid);
35   - }
36   -
37   - @Override
38   - @Transactional
39   - public int batchInsert(List<ProductAttrValue> list) {
40   - if(CollectionUtils.isEmpty(list)){
41   - return 0;
42   - }
43   - return productPopAttrValueDao.batchInsert(list);
44   - }
45   -}
titan-api/src/main/java/com/dili/titan/ws/product/pop/impl/ProductPopAuditRestServiceImpl.java deleted 100755 → 0
1   -package com.dili.titan.ws.product.pop.impl;
2   -
3   -import com.dili.titan.dao.product.pop.ProductPopAuditDao;
4   -import com.dili.titan.domain.pop.ProductPopAudit;
5   -import com.dili.titan.ws.product.pop.ProductPopAuditRestService;
6   -import org.springframework.stereotype.Service;
7   -
8   -import javax.annotation.Resource;
9   -
10   -/**
11   - * Created by gsz on 2015/6/3.
12   - */
13   -@Service
14   -public class ProductPopAuditRestServiceImpl implements ProductPopAuditRestService {
15   -
16   - @Resource
17   - private ProductPopAuditDao productPopAuditDao;
18   -
19   - @Override
20   - public int insertEntry(ProductPopAudit audit) {
21   - return productPopAuditDao.insertEntry(audit);
22   - }
23   -}
titan-api/src/main/java/com/dili/titan/ws/product/pop/impl/ProductPopPriceRangeRestServiceImpl.java deleted 100755 → 0
1   -/*
2   - * Copyright (c) 2014 www.diligrp.com All rights reserved.
3   - * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4   - */
5   -package com.dili.titan.ws.product.pop.impl;
6   -
7   -import com.dili.titan.common.ProductStatus;
8   -import com.dili.titan.common.datasource.DynamicSource;
9   -import com.dili.titan.common.exception.TitanError;
10   -import com.dili.titan.dao.product.pop.ProductPopPriceRangeDao;
11   -import com.dili.titan.domain.pop.ProductPopPriceRange;
12   -import com.dili.titan.ws.product.pop.ProductPopPriceRangeRestService;
13   -import org.springframework.stereotype.Service;
14   -import org.springframework.transaction.annotation.Transactional;
15   -import org.springframework.transaction.interceptor.TransactionAspectSupport;
16   -import org.springframework.util.CollectionUtils;
17   -
18   -import javax.annotation.Resource;
19   -import java.util.List;
20   -
21   -/**
22   - * <B>Description</B> TODO <br />
23   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
24   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
25   - * <B>Company</B> 地利集团
26   - * @createTime 2014年8月28日 上午10:25:21
27   - * @author yangjianjun
28   - */
29   -@Service("productPopPriceRangeRestService")
30   -@DynamicSource
31   -public class ProductPopPriceRangeRestServiceImpl implements ProductPopPriceRangeRestService {
32   -
33   - @Resource private ProductPopPriceRangeDao productPopPriceRangeDao;
34   - private static final Integer MINIMUM_VERSION = 1;
35   -
36   - @Override
37   - @Transactional(rollbackFor = TitanError.class)
38   - public void batchInsertPriceRange(List<ProductPopPriceRange> priceRangeList)
39   - throws TitanError {
40   - if(CollectionUtils.isEmpty(priceRangeList)){
41   - throw new TitanError(0, "区间价格不能为空,添加失败");
42   - }
43   - try{
44   - //TODO 改为批量添加
45   - for(ProductPopPriceRange priceRange :priceRangeList){
46   - priceRange.setStatus(ProductStatus.PRODUCT_NEW);
47   - priceRange.setVersion(MINIMUM_VERSION);
48   - priceRange.setPrice(priceRange.getPrice());
49   - productPopPriceRangeDao.insertEntry(priceRange);
50   - }
51   - }catch(Exception e){
52   - e.printStackTrace();
53   - TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
54   - throw new TitanError(0, "价格区间入库错误,操作失败");
55   - }
56   -
57   - }
58   -
59   - @Override
60   - @Transactional(rollbackFor = TitanError.class)
61   - public void batchUpdatePriceRange(List<ProductPopPriceRange> priceRangeList)
62   - throws TitanError {
63   - if(CollectionUtils.isEmpty(priceRangeList)){
64   - throw new TitanError(0, "区间价格不能为空,添加失败");
65   - }
66   - try{
67   - int result=productPopPriceRangeDao.deletePopPriceRange(priceRangeList.get(0).getPid());
68   - if(result<0){
69   - throw new TitanError(0, "更新区间价格失败");
70   - }
71   - //TODO 调整为批量插入
72   - for(ProductPopPriceRange priceRange:priceRangeList){
73   - priceRange.setStatus(ProductStatus.PRODUCT_NEW);
74   - priceRange.setVersion(MINIMUM_VERSION);
75   - priceRange.setPrice(priceRange.getPrice());
76   - productPopPriceRangeDao.insertEntry(priceRange);
77   - }
78   - }catch(Exception e){
79   - e.printStackTrace();
80   - throw new TitanError(0, "价格区间修改错误,操作失败");
81   - }
82   -
83   - }
84   -
85   - @Override
86   - public List<ProductPopPriceRange> getPopPriceRange(Long pid) {
87   - return productPopPriceRangeDao.getPopPriceRange(pid);
88   - }
89   -
90   - @Override
91   - public ProductPopPriceRange selectEntry(Long pid) {
92   - return productPopPriceRangeDao.selectEntry(pid);
93   - }
94   -
95   - @Override
96   - @Transactional
97   - public int updateByKey(ProductPopPriceRange productPopPriceRange) {
98   - return productPopPriceRangeDao.updateByKey(productPopPriceRange);
99   - }
100   -}
titan-api/src/main/java/com/dili/titan/ws/stock/StockRestService.java deleted 100755 → 0
1   -package com.dili.titan.ws.stock;
2   -
3   -import com.dili.titan.common.exception.TitanError;
4   -import com.dili.titan.rest.domain.input.SkuChangeInput;
5   -import com.dili.titan.rest.domain.output.StockInfo;
6   -
7   -import java.util.List;
8   -
9   -/**
10   - *
11   - * <B>Description</B>库存服务 <br />
12   - * <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
13   - * 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
14   - * <B>Company</B> 地利集团
15   - * @createTime 2014年6月18日 下午6:43:25
16   - * @author celine
17   - */
18   -public interface StockRestService {
19   -
20   - /**
21   - * 批量获取商品sku的库存信息
22   - * @param skus
23   - * @return
24   - * @throws com.dili.titan.common.exception.TitanError
25   - * @createTime 2014年6月18日 下午6:47:10
26   - */
27   - public List<StockInfo> selectStockInfo(List<String> skus) throws TitanError;
28   -
29   - public void decrase(List<SkuChangeInput> inputs) throws TitanError;
30   -
31   - public void incrase(Long serialNum, List<SkuChangeInput> inputs) throws TitanError;
32   -
33   - public void decrase(Long serialNum, List<SkuChangeInput> inputs) throws TitanError;
34   -
35   - public void incrase(List<SkuChangeInput> inputs) throws TitanError;
36   -
37   -}
titan-api/src/main/java/com/dili/titan/ws/stock/impl/StockRestServiceImpl.java deleted 100755 → 0
1   -package com.dili.titan.ws.stock.impl;
2   -
3   -import com.dili.titan.common.ProductStatus;
4   -import com.dili.titan.common.datasource.DynamicSource;
5   -import com.dili.titan.common.exception.TitanError;
6   -import com.dili.titan.common.utils.SkuUtil;
7   -import com.dili.titan.domain.JsonOrderStock;
8   -import com.dili.titan.domain.JsonStock;
9   -import com.dili.titan.domain.ProductSku;
10   -import com.dili.titan.domain.pop.ProductSkuPop;
11   -import com.dili.titan.rest.domain.input.SkuChangeInput;
12   -import com.dili.titan.rest.domain.output.StockInfo;
13   -import com.dili.titan.service.stock.StockService;
14   -import com.dili.titan.ws.product.pop.ProductSkuPopRestService;
15   -import com.dili.titan.ws.stock.StockRestService;
16   -import org.apache.commons.collections.CollectionUtils;
17   -import org.springframework.stereotype.Service;
18   -import org.springframework.transaction.annotation.Transactional;
19   -
20   -import javax.annotation.Resource;
21   -import java.util.ArrayList;
22   -import java.util.List;
23   -
24   -
25   -@Service(value = "stockRestService")
26   -@DynamicSource
27   -public class StockRestServiceImpl implements StockRestService {
28   - @Resource
29   - private StockService stockService;
30   - @Resource
31   - private ProductSkuPopRestService productSkuPopRestService;
32   - @Override
33   - public List<StockInfo> selectStockInfo(List<String> skus) throws
34   - TitanError {
35   - List<String> popSku = new ArrayList<String>();
36   - for (String sku : skus) {
37   - String skuEnc = SkuUtil.getSkuEncWithOutVersion(sku);
38   - switch (SkuUtil.getProductType(sku)) {
39   - case ProductStatus.PRODUCT_POP:
40   - popSku.add(skuEnc);
41   - break;
42   - }
43   - }
44   - List<StockInfo> stockInfos = new ArrayList<StockInfo>();
45   - stockInfos.addAll(generatePopStockInfo(popSku));
46   - return stockInfos;
47   - }
48   -
49   - /**
50   - * 查询popSku库存
51   - * @param popSku
52   - * @return
53   - * @createTime 2014年6月19日 上午10:17:45
54   - */
55   - private List<StockInfo> generatePopStockInfo(List<String> popSku) {
56   - if (popSku != null && popSku.size() > 0) {
57   - List<ProductSkuPop> popSkuInfo = productSkuPopRestService.findSku(popSku,false);
58   - return convert(popSkuInfo);
59   - }
60   - return new ArrayList<StockInfo>();
61   - }
62   -
63   - private <T extends ProductSku> List<StockInfo> convert(List<T> skuInfo) {
64   - List<StockInfo> stockInfos = new ArrayList<StockInfo>();
65   - if (CollectionUtils.isEmpty(skuInfo)) {
66   - return stockInfos;
67   - }
68   - for (T t : skuInfo) {
69   - StockInfo stockInfo = new StockInfo();
70   - String skuEnc = SkuUtil.encode(t.getSku(), t.getVersion());
71   - stockInfo.setSku(skuEnc);
72   - stockInfo.setStatus(t.getStatus());
73   - stockInfo.setStockNum(t.getStore());
74   - stockInfos.add(stockInfo);
75   - }
76   - return stockInfos;
77   - }
78   -
79   - @Override
80   - @Transactional
81   - public void decrase(List<SkuChangeInput> inputs) throws TitanError {
82   -
83   - if (inputs == null) {
84   - throw new TitanError(0, "输入参数错误");
85   - }
86   - JsonOrderStock jOrderStock = new JsonOrderStock();
87   - jOrderStock.setStocks(convertSkuChange(inputs));
88   - boolean flag = stockService.lockWithOutSerialNum(jOrderStock);
89   - if (!flag) {
90   - throw new TitanError(0, "增加库存失败");
91   - }
92   - }
93   -
94   - @Override
95   - @Transactional
96   - public void incrase(List<SkuChangeInput> inputs) throws TitanError {
97   - if (inputs == null) {
98   - throw new TitanError(0, "输入参数错误");
99   - }
100   -
101   - JsonOrderStock jOrderStock = new JsonOrderStock();
102   - jOrderStock.setStocks(convertSkuChange(inputs));
103   - boolean flag = stockService.unlockWithOutSerialNum(jOrderStock);
104   - if (!flag) {
105   - throw new TitanError(0, "增加库存失败");
106   - }
107   - }
108   -
109   - @Override
110   - @Transactional()
111   - public void incrase(Long serialNum, List<SkuChangeInput> inputs) throws TitanError {
112   - if (serialNum == null || inputs == null) {
113   - throw new TitanError(0, "输入参数错误");
114   - }
115   - JsonOrderStock jOrderStock = new JsonOrderStock();
116   - jOrderStock.setSn(serialNum);
117   - jOrderStock.setStocks(convertSkuChange(inputs));
118   - boolean flag = stockService.unlock(jOrderStock);
119   - if (!flag) {
120   - throw new TitanError(0, "增加库存失败");
121   - }
122   -
123   - }
124   -
125   - @Override
126   - @Transactional
127   - public void decrase(Long serialNum, List<SkuChangeInput> inputs) throws TitanError {
128   - if (serialNum == null || inputs == null) {
129   - throw new TitanError(0, "输入参数错误");
130   - }
131   - JsonOrderStock jOrderStock = new JsonOrderStock();
132   - jOrderStock.setSn(serialNum);
133   - jOrderStock.setStocks(convertSkuChange(inputs));
134   - boolean flag = stockService.lock(jOrderStock);
135   - if (!flag) {
136   - throw new TitanError(0, "扣减库存失败");
137   - }
138   -
139   - }
140   -
141   - private List<JsonStock> convertSkuChange(List<SkuChangeInput> changes) throws TitanError {
142   - List<JsonStock> stocks = new ArrayList<JsonStock>();
143   - for (SkuChangeInput change : changes) {
144   - JsonStock stock = new JsonStock();
145   - stock.setPid(SkuUtil.getPid(change.getSku(), true));
146   - stock.setSku(SkuUtil.getSkuEncWithOutVersion(change.getSku()));
147   - stock.setCount(change.getChangeNum());
148   - stocks.add(stock);
149   - }
150   - return stocks;
151   - }
152   -}
titan-api/src/main/java/com/dili/titan/common/Account.java renamed to titan-api/src/main/java/com/diligrp/titan/common/Account.java
1   -package com.dili.titan.common;
  1 +package com.diligrp.titan.common;
2 2  
3 3 /**
4 4 * 账号类
... ...
titan-api/src/main/java/com/dili/titan/common/HttpRequester.java renamed to titan-api/src/main/java/com/diligrp/titan/common/HttpRequester.java
1   -package com.dili.titan.common;
  1 +package com.diligrp.titan.common;
2 2  
3 3 import java.io.BufferedReader;
4 4 import java.io.IOException;
... ...
titan-api/src/main/java/com/dili/titan/common/HttpResponse.java renamed to titan-api/src/main/java/com/diligrp/titan/common/HttpResponse.java
1   -package com.dili.titan.common;
  1 +package com.diligrp.titan.common;
2 2  
3 3 import java.util.Vector;
4 4  
... ...
titan-api/src/main/java/com/dili/titan/common/MapKey.java renamed to titan-api/src/main/java/com/diligrp/titan/common/MapKey.java
1   -package com.dili.titan.common;
  1 +package com.diligrp.titan.common;
2 2  
3 3 import java.lang.annotation.Retention;
4 4 import java.lang.annotation.Target;
... ...
titan-api/src/main/java/com/dili/titan/common/ProductStatus.java renamed to titan-api/src/main/java/com/diligrp/titan/common/ProductStatus.java
1   -package com.dili.titan.common;
  1 +package com.diligrp.titan.common;
2 2  
3 3 public class ProductStatus {
4 4  
... ...
titan-api/src/main/java/com/dili/titan/common/datasource/DataSourceAspect.java renamed to titan-api/src/main/java/com/diligrp/titan/common/datasource/DataSourceAspect.java
1   -package com.dili.titan.common.datasource;
  1 +package com.diligrp.titan.common.datasource;
2 2  
3 3 import org.aspectj.lang.ProceedingJoinPoint;
4 4 import org.aspectj.lang.reflect.MethodSignature;
... ...
titan-api/src/main/java/com/dili/titan/common/datasource/DataSourceSwitcher.java renamed to titan-api/src/main/java/com/diligrp/titan/common/datasource/DataSourceSwitcher.java
1   -package com.dili.titan.common.datasource;
  1 +package com.diligrp.titan.common.datasource;
2 2  
3 3 import org.springframework.util.Assert;
4 4  
... ...
titan-api/src/main/java/com/dili/titan/common/datasource/DynamicDataSource.java renamed to titan-api/src/main/java/com/diligrp/titan/common/datasource/DynamicDataSource.java
1   -package com.dili.titan.common.datasource;
  1 +package com.diligrp.titan.common.datasource;
2 2  
3 3 import org.apache.commons.lang.StringUtils;
4 4 import org.slf4j.Logger;
... ...
titan-api/src/main/java/com/dili/titan/common/datasource/DynamicSource.java renamed to titan-api/src/main/java/com/diligrp/titan/common/datasource/DynamicSource.java
1   -package com.dili.titan.common.datasource;
  1 +package com.diligrp.titan.common.datasource;
2 2  
3 3 import java.lang.annotation.*;
4 4  
... ...
titan-api/src/main/java/com/dili/titan/common/exception/AppException.java renamed to titan-api/src/main/java/com/diligrp/titan/common/exception/AppException.java
... ... @@ -2,7 +2,7 @@
2 2 * Copyright (c) 2014 www.diligrp.com All rights reserved.
3 3 * 本软件源代码版权归----所有,未经许可不得任意复制与传播.
4 4 */
5   -package com.dili.titan.common.exception;
  5 +package com.diligrp.titan.common.exception;
6 6  
7 7 /**
8 8 * AppException
... ...
titan-api/src/main/java/com/dili/titan/common/exception/TitanError.java renamed to titan-api/src/main/java/com/diligrp/titan/common/exception/TitanError.java
1   -package com.dili.titan.common.exception;
  1 +package com.diligrp.titan.common.exception;
2 2  
3 3 public final class TitanError extends Exception {
4 4  
... ...
titan-api/src/main/java/com/dili/titan/common/log/LogBusinessIdUtils.java renamed to titan-api/src/main/java/com/diligrp/titan/common/log/LogBusinessIdUtils.java
1   -package com.dili.titan.common.log;
  1 +package com.diligrp.titan.common.log;
2 2  
3 3 import org.apache.commons.lang.StringUtils;
4 4  
... ...
titan-api/src/main/java/com/dili/titan/common/log/LogHelper.java renamed to titan-api/src/main/java/com/diligrp/titan/common/log/LogHelper.java
1   -package com.dili.titan.common.log;
  1 +package com.diligrp.titan.common.log;
2 2  
3 3 import org.apache.commons.lang.StringUtils;
4 4 import org.slf4j.Logger;
... ...
titan-api/src/main/java/com/dili/titan/common/log/LogTypeEnum.java renamed to titan-api/src/main/java/com/diligrp/titan/common/log/LogTypeEnum.java
1   -package com.dili.titan.common.log;
  1 +package com.diligrp.titan.common.log;
2 2  
3 3 import org.apache.commons.lang.StringUtils;
4 4 import org.slf4j.Logger;
... ...
titan-api/src/main/java/com/dili/titan/common/log/MarkConstant.java renamed to titan-api/src/main/java/com/diligrp/titan/common/log/MarkConstant.java
1   -package com.dili.titan.common.log;
  1 +package com.diligrp.titan.common.log;
2 2  
3 3 /**
4 4 * 所有符号的常量类
... ...
titan-api/src/main/java/com/dili/titan/common/tools/DateUtils.java renamed to titan-api/src/main/java/com/diligrp/titan/common/tools/DateUtils.java
1   -package com.dili.titan.common.tools;
  1 +package com.diligrp.titan.common.tools;
2 2  
3 3 import org.slf4j.Logger;
4 4 import org.slf4j.LoggerFactory;
... ...
titan-api/src/main/java/com/dili/titan/common/tools/NullTool.java renamed to titan-api/src/main/java/com/diligrp/titan/common/tools/NullTool.java
1   -package com.dili.titan.common.tools;
  1 +package com.diligrp.titan.common.tools;
2 2  
3 3 /*
4 4 * Copyright 2003-2004 The Apache Software Foundation.
... ...
titan-api/src/main/java/com/dili/titan/common/tools/RegexUtils.java renamed to titan-api/src/main/java/com/diligrp/titan/common/tools/RegexUtils.java
1   -package com.dili.titan.common.tools;
  1 +package com.diligrp.titan.common.tools;
2 2  
3 3 import java.util.regex.Matcher;
4 4 import java.util.regex.Pattern;
... ...
titan-api/src/main/java/com/dili/titan/common/tools/Tools.java renamed to titan-api/src/main/java/com/diligrp/titan/common/tools/Tools.java
1   -package com.dili.titan.common.tools;
  1 +package com.diligrp.titan.common.tools;
2 2  
3 3 import java.math.BigDecimal;
4 4 import java.text.ParseException;
... ...