Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Aidea
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sa_aidea
Aidea
Commits
d65c82f6
Commit
d65c82f6
authored
Sep 24, 2020
by
卜远杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
产品分类
parent
c6a99534
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1361 additions
and
1 deletion
+1361
-1
pom.xml
aidea-modules/pom.xml
+2
-0
pom.xml
aidea-modules/product-classify-module-web/pom.xml
+29
-0
productclassifyform.html
...pp/WEB-INF/views/productclassify/productclassifyform.html
+322
-0
productclassifylist.html
...pp/WEB-INF/views/productclassify/productclassifylist.html
+338
-0
pom.xml
aidea-modules/product-classify-module/pom.xml
+22
-0
ProductclassifyMapper.java
...com/cftech/productclassify/dao/ProductclassifyMapper.java
+24
-0
ProductclassifyMapper.xml
.../com/cftech/productclassify/dao/ProductclassifyMapper.xml
+201
-0
Productclassify.java
...ava/com/cftech/productclassify/model/Productclassify.java
+71
-0
ProductclassifyService.java
...ftech/productclassify/service/ProductclassifyService.java
+28
-0
ProductclassifyServiceImpl.java
...ductclassify/service/impl/ProductclassifyServiceImpl.java
+46
-0
ProductclassifyController.java
...cftech/productclassify/web/ProductclassifyController.java
+276
-0
common-test.properties
cftech-common-web/src/main/resources/common-test.properties
+1
-0
SystemConfig.java
...mmon/src/main/java/com/cftech/core/util/SystemConfig.java
+1
-1
No files found.
aidea-modules/pom.xml
View file @
d65c82f6
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
<modules>
<modules>
<module>
consult-module
</module>
<module>
consult-module
</module>
<module>
consult-module-web
</module>
<module>
consult-module-web
</module>
<module>
product-classify-module
</module>
<module>
product-classify-module-web
</module>
</modules>
</modules>
<dependencies>
<dependencies>
...
...
aidea-modules/product-classify-module-web/pom.xml
0 → 100644
View file @
d65c82f6
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
product-classify-module-web
</artifactId>
<packaging>
war
</packaging>
<name>
product-classify-module-web Maven Webapp
</name>
<url>
http://maven.apache.org
</url>
<dependencies>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
3.8.1
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
product-classify-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
<build>
<finalName>
product-classify-module-web
</finalName>
</build>
</project>
aidea-modules/product-classify-module-web/src/main/webapp/WEB-INF/views/productclassify/productclassifyform.html
0 → 100644
View file @
d65c82f6
This diff is collapsed.
Click to expand it.
aidea-modules/product-classify-module-web/src/main/webapp/WEB-INF/views/productclassify/productclassifylist.html
0 → 100644
View file @
d65c82f6
This diff is collapsed.
Click to expand it.
aidea-modules/product-classify-module/pom.xml
0 → 100644
View file @
d65c82f6
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<parent>
<artifactId>
aidea-modules
</artifactId>
<groupId>
com.cftech
</groupId>
<version>
1.0-SNAPSHOT
</version>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
product-classify-module
</artifactId>
<dependencies>
<dependency>
<groupId>
com.cftech
</groupId>
<artifactId>
sys-module
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/dao/ProductclassifyMapper.java
0 → 100644
View file @
d65c82f6
package
com
.
cftech
.
productclassify
.
dao
;
import
com.cftech.productclassify.model.Productclassify
;
import
com.cftech.core.generic.GenericDao
;
import
java.util.List
;
import
java.util.Map
;
/**
* 产品分类Mapper
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
public
interface
ProductclassifyMapper
extends
GenericDao
<
Productclassify
>
{
/**
* 查产品分类
* @param params
* @return
*/
List
<
Productclassify
>
fetchTreeByPage
(
Map
<
String
,
Object
>
params
);
}
\ No newline at end of file
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/dao/ProductclassifyMapper.xml
0 → 100644
View file @
d65c82f6
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.cftech.productclassify.dao.ProductclassifyMapper"
>
<resultMap
id=
"resultMap"
type=
"com.cftech.productclassify.model.Productclassify"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"classify_name"
property=
"classifyName"
/>
<result
column=
"classify_number"
property=
"classifyNumber"
/>
<result
column=
"classify_img"
property=
"classifyImg"
/>
<result
column=
"sort"
property=
"sort"
/>
<result
column=
"whether_recommend"
property=
"whetherRecommend"
/>
<result
column=
"parent_id"
property=
"parentId"
/>
<result
column=
"parentName"
property=
"parentName"
/>
<result
column=
"accounts_id"
property=
"accountsId"
/>
<result
column=
"del_flag"
property=
"delFlag"
/>
<result
column=
"status"
property=
"status"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"create_by"
property=
"createBy"
/>
<result
column=
"update_by"
property=
"updateBy"
/>
</resultMap>
<sql
id=
"sqlWhere"
>
<if
test=
"conds!=null"
>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND|OR"
>
<foreach
collection=
"conds.conds"
index=
"index"
item=
"cond"
>
${cond.linkType}
<if
test=
"cond.condType == 'EQUAL'"
>
${cond.param} = #{cond.value}
</if>
<if
test=
"cond.condType == 'NOTEQUAL'"
>
${cond.param}
<>
#{cond.value}
</if>
<if
test=
"cond.condType == 'GREATEQUAL'"
>
${cond.param}
>
= #{cond.value}
</if>
<if
test=
"cond.condType == 'GREATTHAN'"
>
${cond.param}
>
#{cond.value}
</if>
<if
test=
"cond.condType == 'LESSEQUAL'"
>
${cond.param}
<
= #{cond.value}
</if>
<if
test=
"cond.condType == 'LESSTHAN'"
>
${cond.param}
<
#{cond.value}
</if>
<if
test=
"cond.condType == 'BETWEEN'"
>
${cond.param} BETWEEN #{cond.startValue} AND
#{cond.endValue}
</if>
<if
test=
"cond.condType == 'ISNULL'"
>
${cond.param} IS NULL
</if>
<if
test=
"cond.condType == 'NOTNULL'"
>
${cond.param} IS NOT NULL
</if>
<if
test=
"cond.condType == 'LIKE'"
>
${cond.param} LIKE #{cond.value}
</if>
<if
test=
"cond.condType == 'IN'"
>
${cond.param} IN
<foreach
item=
"item"
index=
"index"
collection=
"cond.value"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</if>
</foreach>
</trim>
</if>
</sql>
<sql
id=
"sqlColumns"
>
id,
classify_name,
classify_number,
classify_img,
sort,
whether_recommend,
parent_id,
accounts_id,
del_flag,
status,
create_time,
update_time,
description,
create_by,
update_by
</sql>
<insert
id=
"save"
parameterType=
"com.cftech.productclassify.model.Productclassify"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into t_aidea_product_classify
(
<include
refid=
"sqlColumns"
/>
)
values
(
#{id, jdbcType=BIGINT},
#{classifyName, jdbcType=VARCHAR},
#{classifyNumber, jdbcType=VARCHAR},
#{classifyImg, jdbcType=VARCHAR},
#{sort, jdbcType=VARCHAR},
#{whetherRecommend, jdbcType=VARCHAR},
#{parentId, jdbcType=VARCHAR},
#{accountsId, jdbcType=BIGINT},
#{delFlag, jdbcType=TINYINT},
#{status, jdbcType=VARCHAR},
now(),
now(),
#{description, jdbcType=VARCHAR},
#{createBy, jdbcType=BIGINT},
#{updateBy, jdbcType=BIGINT}
)
</insert>
<select
id=
"fetchTreeByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_product_classify
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<select
id=
"fetchById"
parameterType=
"java.lang.Long"
resultMap=
"resultMap"
>
SELECT
<include
refid=
"sqlColumns"
/>
FROM t_aidea_product_classify t
WHERE t.id=#{id}
</select>
<select
id=
"count"
parameterType=
"java.util.Map"
resultType=
"java.lang.Integer"
>
SELECT
COUNT(1)
FROM
t_aidea_product_classify a
LEFT JOIN t_aidea_product_classify b ON b.id = a.parent_id
AND b.del_flag = '0'
<include
refid=
"sqlWhere"
/>
</select>
<select
id=
"fetchSearchByPage"
parameterType=
"java.util.Map"
resultMap=
"resultMap"
>
SELECT
a.id id,
a.classify_name classifyName,
a.classify_number classifyNumber,
a.classify_img classifyImg,
a.sort sort,
a.whether_recommend whetherRecommend,
a.parent_id parentId,
a.del_flag delFlag,
a.create_time createTime,
a.update_time updateTime,
a.description description,
a.create_by crateBy,
a.update_by updateBy,
b.classify_name parentName
FROM
t_aidea_product_classify a
LEFT JOIN t_aidea_product_classify b ON b.id = a.parent_id
AND b.del_flag = '0'
<include
refid=
"sqlWhere"
/>
<if
test=
"sort!=null"
>
ORDER BY ${sort.param} ${sort.type}
</if>
<if
test=
"limit>0"
>
limit #{offset},#{limit}
</if>
</select>
<update
id=
"update"
parameterType=
"com.cftech.productclassify.model.Productclassify"
>
update t_aidea_product_classify
<set>
<if
test=
"id != null"
>
id = #{id, jdbcType=BIGINT},
</if>
<if
test=
"classifyName != null"
>
classify_name = #{classifyName, jdbcType=VARCHAR},
</if>
<if
test=
"classifyNumber != null"
>
classify_number = #{classifyNumber, jdbcType=VARCHAR},
</if>
<if
test=
"classifyImg != null"
>
classify_img = #{classifyImg, jdbcType=VARCHAR},
</if>
<if
test=
"sort != null"
>
sort = #{sort, jdbcType=VARCHAR},
</if>
<if
test=
"whetherRecommend != null"
>
whether_recommend = #{whetherRecommend, jdbcType=VARCHAR},
</if>
<if
test=
"parentId != null"
>
parent_id = #{parentId, jdbcType=VARCHAR},
</if>
<if
test=
"accountsId != null"
>
accounts_id = #{accountsId, jdbcType=BIGINT},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag, jdbcType=TINYINT},
</if>
<if
test=
"status != null"
>
status = #{status, jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime, jdbcType=TIMESTAMP},
</if>
<if
test=
"description != null"
>
description = #{description, jdbcType=VARCHAR},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy, jdbcType=BIGINT},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy, jdbcType=BIGINT},
</if>
</set>
where id=#{id,jdbcType=BIGINT}
</update>
<update
id=
"delete"
parameterType=
"java.lang.Long"
>
update t_aidea_product_classify set del_flag=1 where id=#{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/model/Productclassify.java
0 → 100644
View file @
d65c82f6
package
com
.
cftech
.
productclassify
.
model
;
import
com.cftech.core.poi.ExportConfig
;
import
lombok.Data
;
import
org.apache.cxf.jaxws.handler.types.CString
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 产品分类
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
@Data
public
class
Productclassify
implements
Serializable
{
/* 主键id */
private
Long
id
;
/* 分类名称 */
@ExportConfig
(
value
=
"分类名称"
,
width
=
100
,
showLevel
=
2
)
private
String
classifyName
;
/* 分类编码 */
@ExportConfig
(
value
=
"分类编码"
,
width
=
100
,
showLevel
=
2
)
private
String
classifyNumber
;
/* 分类banner图 */
@ExportConfig
(
value
=
"分类banner图"
,
width
=
100
,
showLevel
=
1
)
private
String
classifyImg
;
/* 序号 */
@ExportConfig
(
value
=
"序号"
,
width
=
100
,
showLevel
=
2
)
private
String
sort
;
/* 是否推荐 */
@ExportConfig
(
value
=
"是否推荐(是/否)"
,
width
=
200
,
showLevel
=
2
)
private
String
whetherRecommend
;
/**
* 父级ID
*/
private
String
parentId
;
/**
* 父级ID 对应的产品分类名称
*/
@ExportConfig
(
value
=
"父级编码(不填默认为第一级)"
,
width
=
300
,
showLevel
=
2
)
private
String
parentName
;
/**
* 父级编码
*/
private
String
parentNumber
;
/* 所属的账号 */
private
Long
accountsId
;
/* 删除标识 */
private
boolean
delFlag
;
/* 状态 */
private
String
status
;
/* 创建时间 */
private
Date
createTime
;
/* 更新时间 */
private
Date
updateTime
;
/* 备注 */
private
String
description
;
/* 创建人 */
private
Long
createBy
;
/* 更新人 */
private
Long
updateBy
;
public
Productclassify
()
{
this
.
delFlag
=
false
;
this
.
status
=
"0"
;
}
}
\ No newline at end of file
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/service/ProductclassifyService.java
0 → 100644
View file @
d65c82f6
package
com
.
cftech
.
productclassify
.
service
;
import
com.cftech.core.sql.Conds
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.productclassify.model.Productclassify
;
import
com.cftech.core.generic.GenericService
;
import
java.util.List
;
import
java.util.Map
;
/**
* 产品分类Service
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
public
interface
ProductclassifyService
extends
GenericService
<
Productclassify
>
{
/**
* 查找产品分类
* @param conds
* @param sort
* @param pageNo
* @param pageSize
* @return
*/
List
<
Productclassify
>
fetchTreeByPage
(
Conds
conds
,
Sort
sort
,
int
pageNo
,
int
pageSize
);
}
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/service/impl/ProductclassifyServiceImpl.java
0 → 100644
View file @
d65c82f6
package
com
.
cftech
.
productclassify
.
service
.
impl
;
import
com.cftech.core.sql.Sort
;
import
com.cftech.productclassify.model.Productclassify
;
import
com.cftech.productclassify.dao.ProductclassifyMapper
;
import
com.cftech.productclassify.service.ProductclassifyService
;
import
com.cftech.core.generic.GenericDao
;
import
com.cftech.core.generic.GenericServiceImpl
;
import
com.cftech.core.sql.Conds
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Qualifier
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 产品分类ServiceImpl
*
* @author Buyj
* @date: 2020-09-22 18:06
*/
@Service
(
"productclassifyService"
)
public
class
ProductclassifyServiceImpl
extends
GenericServiceImpl
<
Productclassify
>
implements
ProductclassifyService
{
@Autowired
@Qualifier
(
"productclassifyMapper"
)
private
ProductclassifyMapper
productclassifyMapper
;
@Override
public
GenericDao
<
Productclassify
>
getGenericMapper
()
{
return
productclassifyMapper
;
}
@Override
public
List
<
Productclassify
>
fetchTreeByPage
(
Conds
conds
,
Sort
sort
,
int
pageNo
,
int
pageSize
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"conds"
,
conds
);
params
.
put
(
"offset"
,
pageNo
>
0
?
pageNo
:
0
);
params
.
put
(
"limit"
,
pageSize
>
0
?
pageSize
:
0
);
params
.
put
(
"sort"
,
sort
);
return
productclassifyMapper
.
fetchTreeByPage
(
params
);
}
}
\ No newline at end of file
aidea-modules/product-classify-module/src/main/java/com/cftech/productclassify/web/ProductclassifyController.java
0 → 100644
View file @
d65c82f6
This diff is collapsed.
Click to expand it.
cftech-common-web/src/main/resources/common-test.properties
View file @
d65c82f6
...
@@ -106,6 +106,7 @@ orderDeliverGoodsTemplateId=TH3I5prFYPC54M14zFJfgN4gvjx8SpJayctIHmzThwg
...
@@ -106,6 +106,7 @@ orderDeliverGoodsTemplateId=TH3I5prFYPC54M14zFJfgN4gvjx8SpJayctIHmzThwg
#\u670D\u52A1\u5B8C\u6210\u901A\u77E5
#\u670D\u52A1\u5B8C\u6210\u901A\u77E5
serverEndTemplateId
=
7L1KIroXNxejxotFTzll-dVLdo1xbmqoiAo7UmDKWcc
serverEndTemplateId
=
7L1KIroXNxejxotFTzll-dVLdo1xbmqoiAo7UmDKWcc
PRODUCT_CLASSIFY_FATHER_NAME
=
Ʒ
#\u54C1\u724C\u7533\u8BF7\u6D88\u606F\u6A21\u677F
#\u54C1\u724C\u7533\u8BF7\u6D88\u606F\u6A21\u677F
brandApplyCommTemplateId
=
82ByH2tkWI1-jlYiWr_-CIihWsgjrvLdFvuO771FwBo
brandApplyCommTemplateId
=
82ByH2tkWI1-jlYiWr_-CIihWsgjrvLdFvuO771FwBo
...
...
cftech-common/src/main/java/com/cftech/core/util/SystemConfig.java
View file @
d65c82f6
...
@@ -14,7 +14,7 @@ public class SystemConfig {
...
@@ -14,7 +14,7 @@ public class SystemConfig {
try
{
try
{
// inputStream = SystemConfig.class.newInstance().getClass()
// inputStream = SystemConfig.class.newInstance().getClass()
// .getClassLoader().getResourceAsStream("");
// .getClassLoader().getResourceAsStream("");
p
.
load
(
new
InputStreamReader
(
SystemConfig
.
class
.
getClassLoader
().
getResourceAsStream
(
"/common-test.properties"
),
"
utf-8
"
));
p
.
load
(
new
InputStreamReader
(
SystemConfig
.
class
.
getClassLoader
().
getResourceAsStream
(
"/common-test.properties"
),
"
GBK
"
));
inputStreamRedis
=
SystemConfig
.
class
.
newInstance
().
getClass
()
inputStreamRedis
=
SystemConfig
.
class
.
newInstance
().
getClass
()
.
getClassLoader
().
getResourceAsStream
(
"/redis-config-test.properties"
);
.
getClassLoader
().
getResourceAsStream
(
"/redis-config-test.properties"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment