Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
9564182c
Commit
9564182c
authored
Nov 26, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量二维码
parent
ce646292
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
881 additions
and
48 deletions
+881
-48
ch-dao/src/main/java/com/wwdz/ch/db/dao/ItemTagQrCodeDao.java
...ao/src/main/java/com/wwdz/ch/db/dao/ItemTagQrCodeDao.java
+2
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/Category.java
ch-dao/src/main/java/com/wwdz/ch/db/domain/Category.java
+39
-1
ch-dao/src/main/java/com/wwdz/ch/db/domain/CategoryExample.java
.../src/main/java/com/wwdz/ch/db/domain/CategoryExample.java
+568
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/ItemTagQrCodeRequestDto.java
...a/com/wwdz/ch/db/dto/request/ItemTagQrCodeRequestDto.java
+13
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemTagQrCodeDaoImpl.java
...c/main/java/com/wwdz/ch/db/impl/ItemTagQrCodeDaoImpl.java
+5
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/CategoryMapper.xml
...c/main/resources/com/wwdz/ch/db/mapper/CategoryMapper.xml
+82
-20
ch-dao/src/main/resources/generatorConfig_new.xml
ch-dao/src/main/resources/generatorConfig_new.xml
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
.../main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
+1
-1
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemTagQrCodeServiceImpl.java
...in/java/com/wwdz/ch/wx/impl/ItemTagQrCodeServiceImpl.java
+103
-23
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/ItemTagQrCodeService.java
...ain/java/com/wwdz/ch/wx/service/ItemTagQrCodeService.java
+10
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/ItemTagQrCodeController.java
...main/java/com/wwdz/ch/wx/web/ItemTagQrCodeController.java
+57
-0
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/ItemTagQrCodeDao.java
View file @
9564182c
...
@@ -14,5 +14,7 @@ public interface ItemTagQrCodeDao {
...
@@ -14,5 +14,7 @@ public interface ItemTagQrCodeDao {
boolean
update
(
ItemTagQrCode
itemTagQrCode
);
boolean
update
(
ItemTagQrCode
itemTagQrCode
);
boolean
updateByPrimaryKey
(
ItemTagQrCode
itemTagQrCode
);
ItemTagQrCode
findByCode
(
String
code
);
ItemTagQrCode
findByCode
(
String
code
);
}
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/Category.java
View file @
9564182c
package
com.wwdz.ch.db.domain
;
package
com.wwdz.ch.db.domain
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
lombok.Data
;
/**
/**
* @author shiyu
* @author shiyu
* @date 202
3/09/01
* @date 202
4/11/26
*/
*/
@Data
@Data
public
class
Category
implements
Entity
{
public
class
Category
implements
Entity
{
...
@@ -24,6 +26,26 @@ public class Category implements Entity {
...
@@ -24,6 +26,26 @@ public class Category implements Entity {
*/
*/
private
String
desc
;
private
String
desc
;
/**
* 视频号id
*/
private
String
videoAppId
;
/**
* 视频id
*/
private
String
videoId
;
/**
* 视频标题
*/
private
String
videoTitle
;
/**
* 视频主图
*/
private
String
mainImage
;
/**
/**
* 父类目ID
* 父类目ID
*/
*/
...
@@ -85,6 +107,10 @@ public class Category implements Entity {
...
@@ -85,6 +107,10 @@ public class Category implements Entity {
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", name="
).
append
(
name
);
sb
.
append
(
", name="
).
append
(
name
);
sb
.
append
(
", desc="
).
append
(
desc
);
sb
.
append
(
", desc="
).
append
(
desc
);
sb
.
append
(
", videoAppId="
).
append
(
videoAppId
);
sb
.
append
(
", videoId="
).
append
(
videoId
);
sb
.
append
(
", videoTitle="
).
append
(
videoTitle
);
sb
.
append
(
", mainImage="
).
append
(
mainImage
);
sb
.
append
(
", pid="
).
append
(
pid
);
sb
.
append
(
", pid="
).
append
(
pid
);
sb
.
append
(
", icon="
).
append
(
icon
);
sb
.
append
(
", icon="
).
append
(
icon
);
sb
.
append
(
", level="
).
append
(
level
);
sb
.
append
(
", level="
).
append
(
level
);
...
@@ -115,6 +141,10 @@ public class Category implements Entity {
...
@@ -115,6 +141,10 @@ public class Category implements Entity {
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getName
()
==
null
?
other
.
getName
()
==
null
:
this
.
getName
().
equals
(
other
.
getName
()))
&&
(
this
.
getName
()
==
null
?
other
.
getName
()
==
null
:
this
.
getName
().
equals
(
other
.
getName
()))
&&
(
this
.
getDesc
()
==
null
?
other
.
getDesc
()
==
null
:
this
.
getDesc
().
equals
(
other
.
getDesc
()))
&&
(
this
.
getDesc
()
==
null
?
other
.
getDesc
()
==
null
:
this
.
getDesc
().
equals
(
other
.
getDesc
()))
&&
(
this
.
getVideoAppId
()
==
null
?
other
.
getVideoAppId
()
==
null
:
this
.
getVideoAppId
().
equals
(
other
.
getVideoAppId
()))
&&
(
this
.
getVideoId
()
==
null
?
other
.
getVideoId
()
==
null
:
this
.
getVideoId
().
equals
(
other
.
getVideoId
()))
&&
(
this
.
getVideoTitle
()
==
null
?
other
.
getVideoTitle
()
==
null
:
this
.
getVideoTitle
().
equals
(
other
.
getVideoTitle
()))
&&
(
this
.
getMainImage
()
==
null
?
other
.
getMainImage
()
==
null
:
this
.
getMainImage
().
equals
(
other
.
getMainImage
()))
&&
(
this
.
getPid
()
==
null
?
other
.
getPid
()
==
null
:
this
.
getPid
().
equals
(
other
.
getPid
()))
&&
(
this
.
getPid
()
==
null
?
other
.
getPid
()
==
null
:
this
.
getPid
().
equals
(
other
.
getPid
()))
&&
(
this
.
getIcon
()
==
null
?
other
.
getIcon
()
==
null
:
this
.
getIcon
().
equals
(
other
.
getIcon
()))
&&
(
this
.
getIcon
()
==
null
?
other
.
getIcon
()
==
null
:
this
.
getIcon
().
equals
(
other
.
getIcon
()))
&&
(
this
.
getLevel
()
==
null
?
other
.
getLevel
()
==
null
:
this
.
getLevel
().
equals
(
other
.
getLevel
()))
&&
(
this
.
getLevel
()
==
null
?
other
.
getLevel
()
==
null
:
this
.
getLevel
().
equals
(
other
.
getLevel
()))
...
@@ -134,6 +164,10 @@ public class Category implements Entity {
...
@@ -134,6 +164,10 @@ public class Category implements Entity {
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getName
()
==
null
)
?
0
:
getName
().
hashCode
());
result
=
prime
*
result
+
((
getName
()
==
null
)
?
0
:
getName
().
hashCode
());
result
=
prime
*
result
+
((
getDesc
()
==
null
)
?
0
:
getDesc
().
hashCode
());
result
=
prime
*
result
+
((
getDesc
()
==
null
)
?
0
:
getDesc
().
hashCode
());
result
=
prime
*
result
+
((
getVideoAppId
()
==
null
)
?
0
:
getVideoAppId
().
hashCode
());
result
=
prime
*
result
+
((
getVideoId
()
==
null
)
?
0
:
getVideoId
().
hashCode
());
result
=
prime
*
result
+
((
getVideoTitle
()
==
null
)
?
0
:
getVideoTitle
().
hashCode
());
result
=
prime
*
result
+
((
getMainImage
()
==
null
)
?
0
:
getMainImage
().
hashCode
());
result
=
prime
*
result
+
((
getPid
()
==
null
)
?
0
:
getPid
().
hashCode
());
result
=
prime
*
result
+
((
getPid
()
==
null
)
?
0
:
getPid
().
hashCode
());
result
=
prime
*
result
+
((
getIcon
()
==
null
)
?
0
:
getIcon
().
hashCode
());
result
=
prime
*
result
+
((
getIcon
()
==
null
)
?
0
:
getIcon
().
hashCode
());
result
=
prime
*
result
+
((
getLevel
()
==
null
)
?
0
:
getLevel
().
hashCode
());
result
=
prime
*
result
+
((
getLevel
()
==
null
)
?
0
:
getLevel
().
hashCode
());
...
@@ -158,6 +192,10 @@ public class Category implements Entity {
...
@@ -158,6 +192,10 @@ public class Category implements Entity {
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
name
(
"name"
,
"name"
,
"VARCHAR"
,
true
),
name
(
"name"
,
"name"
,
"VARCHAR"
,
true
),
desc
(
"desc"
,
"desc"
,
"VARCHAR"
,
true
),
desc
(
"desc"
,
"desc"
,
"VARCHAR"
,
true
),
videoAppId
(
"video_app_id"
,
"videoAppId"
,
"VARCHAR"
,
false
),
videoId
(
"video_id"
,
"videoId"
,
"VARCHAR"
,
false
),
videoTitle
(
"video_title"
,
"videoTitle"
,
"VARCHAR"
,
false
),
mainImage
(
"main_image"
,
"mainImage"
,
"VARCHAR"
,
false
),
pid
(
"pid"
,
"pid"
,
"INTEGER"
,
false
),
pid
(
"pid"
,
"pid"
,
"INTEGER"
,
false
),
icon
(
"icon"
,
"icon"
,
"VARCHAR"
,
false
),
icon
(
"icon"
,
"icon"
,
"VARCHAR"
,
false
),
level
(
"level"
,
"level"
,
"INTEGER"
,
true
),
level
(
"level"
,
"level"
,
"INTEGER"
,
true
),
...
...
ch-dao/src/main/java/com/wwdz/ch/db/domain/CategoryExample.java
View file @
9564182c
...
@@ -564,6 +564,574 @@ public class CategoryExample {
...
@@ -564,6 +564,574 @@ public class CategoryExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andVideoAppIdIsNull
()
{
addCriterion
(
"video_app_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdIsNotNull
()
{
addCriterion
(
"video_app_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdEqualTo
(
String
value
)
{
addCriterion
(
"video_app_id ="
,
value
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoAppIdEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_app_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdNotEqualTo
(
String
value
)
{
addCriterion
(
"video_app_id <>"
,
value
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoAppIdNotEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_app_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdGreaterThan
(
String
value
)
{
addCriterion
(
"video_app_id >"
,
value
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoAppIdGreaterThanColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_app_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"video_app_id >="
,
value
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoAppIdGreaterThanOrEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_app_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdLessThan
(
String
value
)
{
addCriterion
(
"video_app_id <"
,
value
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoAppIdLessThanColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_app_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"video_app_id <="
,
value
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoAppIdLessThanOrEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_app_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdLike
(
String
value
)
{
addCriterion
(
"video_app_id like"
,
value
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdNotLike
(
String
value
)
{
addCriterion
(
"video_app_id not like"
,
value
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"video_app_id in"
,
values
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"video_app_id not in"
,
values
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"video_app_id between"
,
value1
,
value2
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoAppIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"video_app_id not between"
,
value1
,
value2
,
"videoAppId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdIsNull
()
{
addCriterion
(
"video_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdIsNotNull
()
{
addCriterion
(
"video_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdEqualTo
(
String
value
)
{
addCriterion
(
"video_id ="
,
value
,
"videoId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoIdEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_id = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdNotEqualTo
(
String
value
)
{
addCriterion
(
"video_id <>"
,
value
,
"videoId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoIdNotEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_id <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdGreaterThan
(
String
value
)
{
addCriterion
(
"video_id >"
,
value
,
"videoId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoIdGreaterThanColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_id > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"video_id >="
,
value
,
"videoId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoIdGreaterThanOrEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_id >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdLessThan
(
String
value
)
{
addCriterion
(
"video_id <"
,
value
,
"videoId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoIdLessThanColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_id < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"video_id <="
,
value
,
"videoId"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoIdLessThanOrEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_id <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdLike
(
String
value
)
{
addCriterion
(
"video_id like"
,
value
,
"videoId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdNotLike
(
String
value
)
{
addCriterion
(
"video_id not like"
,
value
,
"videoId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdIn
(
List
<
String
>
values
)
{
addCriterion
(
"video_id in"
,
values
,
"videoId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"video_id not in"
,
values
,
"videoId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"video_id between"
,
value1
,
value2
,
"videoId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoIdNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"video_id not between"
,
value1
,
value2
,
"videoId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleIsNull
()
{
addCriterion
(
"video_title is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleIsNotNull
()
{
addCriterion
(
"video_title is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleEqualTo
(
String
value
)
{
addCriterion
(
"video_title ="
,
value
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoTitleEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_title = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleNotEqualTo
(
String
value
)
{
addCriterion
(
"video_title <>"
,
value
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoTitleNotEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_title <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleGreaterThan
(
String
value
)
{
addCriterion
(
"video_title >"
,
value
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoTitleGreaterThanColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_title > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"video_title >="
,
value
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoTitleGreaterThanOrEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_title >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleLessThan
(
String
value
)
{
addCriterion
(
"video_title <"
,
value
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoTitleLessThanColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_title < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"video_title <="
,
value
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andVideoTitleLessThanOrEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"video_title <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleLike
(
String
value
)
{
addCriterion
(
"video_title like"
,
value
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleNotLike
(
String
value
)
{
addCriterion
(
"video_title not like"
,
value
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleIn
(
List
<
String
>
values
)
{
addCriterion
(
"video_title in"
,
values
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"video_title not in"
,
values
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"video_title between"
,
value1
,
value2
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
public
Criteria
andVideoTitleNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"video_title not between"
,
value1
,
value2
,
"videoTitle"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageIsNull
()
{
addCriterion
(
"main_image is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageIsNotNull
()
{
addCriterion
(
"main_image is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageEqualTo
(
String
value
)
{
addCriterion
(
"main_image ="
,
value
,
"mainImage"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andMainImageEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"main_image = "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageNotEqualTo
(
String
value
)
{
addCriterion
(
"main_image <>"
,
value
,
"mainImage"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andMainImageNotEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"main_image <> "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageGreaterThan
(
String
value
)
{
addCriterion
(
"main_image >"
,
value
,
"mainImage"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andMainImageGreaterThanColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"main_image > "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"main_image >="
,
value
,
"mainImage"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andMainImageGreaterThanOrEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"main_image >= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageLessThan
(
String
value
)
{
addCriterion
(
"main_image <"
,
value
,
"mainImage"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andMainImageLessThanColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"main_image < "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"main_image <="
,
value
,
"mainImage"
);
return
(
Criteria
)
this
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table category
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
Criteria
andMainImageLessThanOrEqualToColumn
(
Category
.
Column
column
)
{
addCriterion
(
new
StringBuilder
(
"main_image <= "
).
append
(
column
.
getEscapedColumnName
()).
toString
());
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageLike
(
String
value
)
{
addCriterion
(
"main_image like"
,
value
,
"mainImage"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageNotLike
(
String
value
)
{
addCriterion
(
"main_image not like"
,
value
,
"mainImage"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageIn
(
List
<
String
>
values
)
{
addCriterion
(
"main_image in"
,
values
,
"mainImage"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"main_image not in"
,
values
,
"mainImage"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"main_image between"
,
value1
,
value2
,
"mainImage"
);
return
(
Criteria
)
this
;
}
public
Criteria
andMainImageNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"main_image not between"
,
value1
,
value2
,
"mainImage"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPidIsNull
()
{
public
Criteria
andPidIsNull
()
{
addCriterion
(
"pid is null"
);
addCriterion
(
"pid is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/ItemTagQrCodeRequestDto.java
View file @
9564182c
...
@@ -4,12 +4,20 @@ import com.xxdxxs.entity.Entity;
...
@@ -4,12 +4,20 @@ import com.xxdxxs.entity.Entity;
import
lombok.Data
;
import
lombok.Data
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
@Data
@Data
public
class
ItemTagQrCodeRequestDto
implements
Entity
{
public
class
ItemTagQrCodeRequestDto
implements
Entity
{
private
Long
userId
;
private
Long
id
;
private
Long
id
;
/**
* 二维码的数量
*/
private
Integer
codeNum
;
/**
/**
* 二维码编码
* 二维码编码
*/
*/
...
@@ -39,4 +47,9 @@ public class ItemTagQrCodeRequestDto implements Entity {
...
@@ -39,4 +47,9 @@ public class ItemTagQrCodeRequestDto implements Entity {
* 绑定的商品id
* 绑定的商品id
*/
*/
private
Long
itemId
;
private
Long
itemId
;
/**
* 商品图片
*/
private
List
<
String
>
images
;
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/ItemTagQrCodeDaoImpl.java
View file @
9564182c
...
@@ -28,6 +28,11 @@ public class ItemTagQrCodeDaoImpl implements ItemTagQrCodeDao {
...
@@ -28,6 +28,11 @@ public class ItemTagQrCodeDaoImpl implements ItemTagQrCodeDao {
return
itemTagQrCodeMapper
.
updateByExampleSelective
(
itemTagQrCode
,
example
)
>
0
;
return
itemTagQrCodeMapper
.
updateByExampleSelective
(
itemTagQrCode
,
example
)
>
0
;
}
}
@Override
public
boolean
updateByPrimaryKey
(
ItemTagQrCode
itemTagQrCode
)
{
return
itemTagQrCodeMapper
.
updateByPrimaryKeySelective
(
itemTagQrCode
)
>
0
;
}
@Override
@Override
public
ItemTagQrCode
findByCode
(
String
code
)
{
public
ItemTagQrCode
findByCode
(
String
code
)
{
ItemTagQrCodeExample
example
=
new
ItemTagQrCodeExample
();
ItemTagQrCodeExample
example
=
new
ItemTagQrCodeExample
();
...
...
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/CategoryMapper.xml
View file @
9564182c
...
@@ -5,6 +5,10 @@
...
@@ -5,6 +5,10 @@
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"desc"
jdbcType=
"VARCHAR"
property=
"desc"
/>
<result
column=
"desc"
jdbcType=
"VARCHAR"
property=
"desc"
/>
<result
column=
"video_app_id"
jdbcType=
"VARCHAR"
property=
"videoAppId"
/>
<result
column=
"video_id"
jdbcType=
"VARCHAR"
property=
"videoId"
/>
<result
column=
"video_title"
jdbcType=
"VARCHAR"
property=
"videoTitle"
/>
<result
column=
"main_image"
jdbcType=
"VARCHAR"
property=
"mainImage"
/>
<result
column=
"pid"
jdbcType=
"INTEGER"
property=
"pid"
/>
<result
column=
"pid"
jdbcType=
"INTEGER"
property=
"pid"
/>
<result
column=
"icon"
jdbcType=
"VARCHAR"
property=
"icon"
/>
<result
column=
"icon"
jdbcType=
"VARCHAR"
property=
"icon"
/>
<result
column=
"level"
jdbcType=
"INTEGER"
property=
"level"
/>
<result
column=
"level"
jdbcType=
"INTEGER"
property=
"level"
/>
...
@@ -77,7 +81,8 @@
...
@@ -77,7 +81,8 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, `name`, `desc`, pid, icon, `level`, sort, created, updated, is_deleted, is_leaf
id, `name`, `desc`, video_app_id, video_id, video_title, main_image, pid, icon, `level`,
sort, created, updated, is_deleted, is_leaf
</sql>
</sql>
<sql
id=
"Blob_Column_List"
>
<sql
id=
"Blob_Column_List"
>
extra, introduction
extra, introduction
...
@@ -132,8 +137,8 @@
...
@@ -132,8 +137,8 @@
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id, `name`, `desc`,
pid, icon, `level`, sort, created, updated, is_deleted, is_leaf
,
id, `name`, `desc`,
video_app_id, video_id, video_title, main_image, pid, icon, `level`
,
extra, introduction
sort, created, updated, is_deleted, is_leaf,
extra, introduction
</otherwise>
</otherwise>
</choose>
</choose>
from category
from category
...
@@ -166,8 +171,8 @@
...
@@ -166,8 +171,8 @@
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id, `name`, `desc`,
pid, icon, `level`, sort, created, updated, is_deleted, is_leaf
,
id, `name`, `desc`,
video_app_id, video_id, video_title, main_image, pid, icon, `level`
,
extra, introduction
sort, created, updated, is_deleted, is_leaf,
extra, introduction
</otherwise>
</otherwise>
</choose>
</choose>
from category
from category
...
@@ -209,13 +214,15 @@
...
@@ -209,13 +214,15 @@
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
SELECT LAST_INSERT_ID()
</selectKey>
</selectKey>
insert into category (`name`, `desc`, pid,
insert into category (`name`, `desc`, video_app_id,
icon, `level`, sort,
video_id, video_title, main_image,
pid, icon, `level`, sort,
created, updated, is_deleted,
created, updated, is_deleted,
is_leaf, extra, introduction
is_leaf, extra, introduction
)
)
values (#{name,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{pid,jdbcType=INTEGER},
values (#{name,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{videoAppId,jdbcType=VARCHAR},
#{icon,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{videoId,jdbcType=VARCHAR}, #{videoTitle,jdbcType=VARCHAR}, #{mainImage,jdbcType=VARCHAR},
#{pid,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{created,jdbcType=TIMESTAMP}, #{updated,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{created,jdbcType=TIMESTAMP}, #{updated,jdbcType=TIMESTAMP}, #{isDeleted,jdbcType=BIT},
#{isLeaf,jdbcType=BIT}, #{extra,jdbcType=LONGVARCHAR}, #{introduction,jdbcType=LONGVARCHAR}
#{isLeaf,jdbcType=BIT}, #{extra,jdbcType=LONGVARCHAR}, #{introduction,jdbcType=LONGVARCHAR}
)
)
...
@@ -226,16 +233,24 @@
...
@@ -226,16 +233,24 @@
</selectKey>
</selectKey>
insert into category
insert into category
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
`id`,
</if>
<if
test=
"name != null"
>
<if
test=
"name != null"
>
`name`,
`name`,
</if>
</if>
<if
test=
"desc != null"
>
<if
test=
"desc != null"
>
`desc`,
`desc`,
</if>
</if>
<if
test=
"videoAppId != null"
>
video_app_id,
</if>
<if
test=
"videoId != null"
>
video_id,
</if>
<if
test=
"videoTitle != null"
>
video_title,
</if>
<if
test=
"mainImage != null"
>
main_image,
</if>
<if
test=
"pid != null"
>
<if
test=
"pid != null"
>
pid,
pid,
</if>
</if>
...
@@ -268,16 +283,24 @@
...
@@ -268,16 +283,24 @@
</if>
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=INTEGER},
</if>
<if
test=
"name != null"
>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"desc != null"
>
<if
test=
"desc != null"
>
#{desc,jdbcType=VARCHAR},
#{desc,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"videoAppId != null"
>
#{videoAppId,jdbcType=VARCHAR},
</if>
<if
test=
"videoId != null"
>
#{videoId,jdbcType=VARCHAR},
</if>
<if
test=
"videoTitle != null"
>
#{videoTitle,jdbcType=VARCHAR},
</if>
<if
test=
"mainImage != null"
>
#{mainImage,jdbcType=VARCHAR},
</if>
<if
test=
"pid != null"
>
<if
test=
"pid != null"
>
#{pid,jdbcType=INTEGER},
#{pid,jdbcType=INTEGER},
</if>
</if>
...
@@ -316,7 +339,6 @@
...
@@ -316,7 +339,6 @@
<include
refid=
"Example_Where_Clause"
/>
<include
refid=
"Example_Where_Clause"
/>
</if>
</if>
</select>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update category
update category
<set>
<set>
...
@@ -329,6 +351,18 @@
...
@@ -329,6 +351,18 @@
<if
test=
"record.desc != null"
>
<if
test=
"record.desc != null"
>
`desc` = #{record.desc,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.videoAppId != null"
>
video_app_id = #{record.videoAppId,jdbcType=VARCHAR},
</if>
<if
test=
"record.videoId != null"
>
video_id = #{record.videoId,jdbcType=VARCHAR},
</if>
<if
test=
"record.videoTitle != null"
>
video_title = #{record.videoTitle,jdbcType=VARCHAR},
</if>
<if
test=
"record.mainImage != null"
>
main_image = #{record.mainImage,jdbcType=VARCHAR},
</if>
<if
test=
"record.pid != null"
>
<if
test=
"record.pid != null"
>
pid = #{record.pid,jdbcType=INTEGER},
pid = #{record.pid,jdbcType=INTEGER},
</if>
</if>
...
@@ -369,6 +403,10 @@
...
@@ -369,6 +403,10 @@
set id = #{record.id,jdbcType=INTEGER},
set id = #{record.id,jdbcType=INTEGER},
`name` = #{record.name,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
video_app_id = #{record.videoAppId,jdbcType=VARCHAR},
video_id = #{record.videoId,jdbcType=VARCHAR},
video_title = #{record.videoTitle,jdbcType=VARCHAR},
main_image = #{record.mainImage,jdbcType=VARCHAR},
pid = #{record.pid,jdbcType=INTEGER},
pid = #{record.pid,jdbcType=INTEGER},
icon = #{record.icon,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
`level` = #{record.level,jdbcType=INTEGER},
`level` = #{record.level,jdbcType=INTEGER},
...
@@ -388,6 +426,10 @@
...
@@ -388,6 +426,10 @@
set id = #{record.id,jdbcType=INTEGER},
set id = #{record.id,jdbcType=INTEGER},
`name` = #{record.name,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
`desc` = #{record.desc,jdbcType=VARCHAR},
video_app_id = #{record.videoAppId,jdbcType=VARCHAR},
video_id = #{record.videoId,jdbcType=VARCHAR},
video_title = #{record.videoTitle,jdbcType=VARCHAR},
main_image = #{record.mainImage,jdbcType=VARCHAR},
pid = #{record.pid,jdbcType=INTEGER},
pid = #{record.pid,jdbcType=INTEGER},
icon = #{record.icon,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
`level` = #{record.level,jdbcType=INTEGER},
`level` = #{record.level,jdbcType=INTEGER},
...
@@ -409,6 +451,18 @@
...
@@ -409,6 +451,18 @@
<if
test=
"desc != null"
>
<if
test=
"desc != null"
>
`desc` = #{desc,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"videoAppId != null"
>
video_app_id = #{videoAppId,jdbcType=VARCHAR},
</if>
<if
test=
"videoId != null"
>
video_id = #{videoId,jdbcType=VARCHAR},
</if>
<if
test=
"videoTitle != null"
>
video_title = #{videoTitle,jdbcType=VARCHAR},
</if>
<if
test=
"mainImage != null"
>
main_image = #{mainImage,jdbcType=VARCHAR},
</if>
<if
test=
"pid != null"
>
<if
test=
"pid != null"
>
pid = #{pid,jdbcType=INTEGER},
pid = #{pid,jdbcType=INTEGER},
</if>
</if>
...
@@ -446,6 +500,10 @@
...
@@ -446,6 +500,10 @@
update category
update category
set `name` = #{name,jdbcType=VARCHAR},
set `name` = #{name,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
video_app_id = #{videoAppId,jdbcType=VARCHAR},
video_id = #{videoId,jdbcType=VARCHAR},
video_title = #{videoTitle,jdbcType=VARCHAR},
main_image = #{mainImage,jdbcType=VARCHAR},
pid = #{pid,jdbcType=INTEGER},
pid = #{pid,jdbcType=INTEGER},
icon = #{icon,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
`level` = #{level,jdbcType=INTEGER},
`level` = #{level,jdbcType=INTEGER},
...
@@ -462,6 +520,10 @@
...
@@ -462,6 +520,10 @@
update category
update category
set `name` = #{name,jdbcType=VARCHAR},
set `name` = #{name,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
`desc` = #{desc,jdbcType=VARCHAR},
video_app_id = #{videoAppId,jdbcType=VARCHAR},
video_id = #{videoId,jdbcType=VARCHAR},
video_title = #{videoTitle,jdbcType=VARCHAR},
main_image = #{mainImage,jdbcType=VARCHAR},
pid = #{pid,jdbcType=INTEGER},
pid = #{pid,jdbcType=INTEGER},
icon = #{icon,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
`level` = #{level,jdbcType=INTEGER},
`level` = #{level,jdbcType=INTEGER},
...
@@ -525,8 +587,8 @@
...
@@ -525,8 +587,8 @@
</foreach>
</foreach>
</when>
</when>
<otherwise>
<otherwise>
id, `name`, `desc`,
pid, icon, `level`, sort, created, updated, is_deleted, is_leaf
,
id, `name`, `desc`,
video_app_id, video_id, video_title, main_image, pid, icon, `level`
,
extra, introduction
sort, created, updated, is_deleted, is_leaf,
extra, introduction
</otherwise>
</otherwise>
</choose>
</choose>
from category
from category
...
...
ch-dao/src/main/resources/generatorConfig_new.xml
View file @
9564182c
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper"
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.wwdz.ch.db.mapper"
targetProject=
"ch-dao/src/main/java"
/>
targetProject=
"ch-dao/src/main/java"
/>
<table
tableName=
"
item_tag_qr_code
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<table
tableName=
"
category
"
enableCountByExample=
"true"
enableUpdateByExample=
"true"
enableDeleteByExample=
"true"
enableSelectByExample=
"true"
selectByExampleQueryId=
"true"
>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
<generatedKey
column=
"id"
sqlStatement=
"Mysql"
identity=
"true"
/>
</table>
</table>
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/config/WebMvcConfiguration.java
View file @
9564182c
...
@@ -53,7 +53,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
...
@@ -53,7 +53,7 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
"/wx/storage/uploadVideo"
,
"/wx/storage/uploadVideo"
,
"/wx/appletPageConfig/**"
,
"/wx/blindBox/**"
,
"/wx/userSignIn/**"
"/wx/appletPageConfig/**"
,
"/wx/blindBox/**"
,
"/wx/userSignIn/**"
//下列路径上线注释
//下列路径上线注释
,
"/wx/sellActivity/**"
,
"/wx/sellActivity/**"
,
"/wx/itemTagQrCode/**"
// ,"/wx/itemTagOperate/**", "/wx/openShop/**", "/wx/earnestRecord/**", "/wx/auctionEarnest/**", "/wx/userAccount/**"
// ,"/wx/itemTagOperate/**", "/wx/openShop/**", "/wx/earnestRecord/**", "/wx/auctionEarnest/**", "/wx/userAccount/**"
/* ,"/wx/specialPerformance/**"
/* ,"/wx/specialPerformance/**"
, "/wx/supplierItem/**", "/wx/shareRecord/**", "/wx/distributionOrder/**", "/wx/selfPage/**", "/wx/auctionRecord/**",
, "/wx/supplierItem/**", "/wx/shareRecord/**", "/wx/distributionOrder/**", "/wx/selfPage/**", "/wx/auctionRecord/**",
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/ItemTagQrCodeServiceImpl.java
View file @
9564182c
...
@@ -2,25 +2,39 @@ package com.wwdz.ch.wx.impl;
...
@@ -2,25 +2,39 @@ package com.wwdz.ch.wx.impl;
import
com.wwdz.ch.core.api.WxAppletApi
;
import
com.wwdz.ch.core.api.WxAppletApi
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.CommConsts
;
import
com.wwdz.ch.core.consts.DistributionEnum
;
import
com.wwdz.ch.core.consts.SupplierItemEnum
;
import
com.wwdz.ch.core.entity.SupplierItemVo
;
import
com.wwdz.ch.core.entity.SupplierItemVo
;
import
com.wwdz.ch.core.storage.QiniuStorage
;
import
com.wwdz.ch.core.storage.QiniuStorage
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.core.util.
QRCodeUtil
;
import
com.wwdz.ch.core.util.
*
;
import
com.wwdz.ch.
core.util.UUID
;
import
com.wwdz.ch.
db.dao.CategoryDao
;
import
com.wwdz.ch.db.dao.ItemTagQrCodeDao
;
import
com.wwdz.ch.db.dao.ItemTagQrCodeDao
;
import
com.wwdz.ch.db.dao.distribution.SupplierItemDao
;
import
com.wwdz.ch.db.dao.distribution.SupplierItemDao
;
import
com.wwdz.ch.db.domain.Category
;
import
com.wwdz.ch.db.domain.ItemTagQrCode
;
import
com.wwdz.ch.db.domain.ItemTagQrCode
;
import
com.wwdz.ch.db.domain.User
;
import
com.wwdz.ch.db.domain.distribution.SupplierItem
;
import
com.wwdz.ch.db.domain.distribution.SupplierItem
;
import
com.wwdz.ch.db.dto.request.ItemTagQrCodeRequestDto
;
import
com.wwdz.ch.db.dto.request.ItemTagQrCodeRequestDto
;
import
com.wwdz.ch.db.dto.request.distribution.SupplierItemRequestDto
;
import
com.wwdz.ch.wx.entity.request.ItemTagOperateRequestDto
;
import
com.wwdz.ch.wx.entity.request.ItemTagOperateRequestDto
;
import
com.wwdz.ch.wx.entity.vo.CategoryVo
;
import
com.wwdz.ch.wx.service.ItemTagQrCodeService
;
import
com.wwdz.ch.wx.service.ItemTagQrCodeService
;
import
com.wwdz.ch.wx.service.distribution.SupplierItemService
;
import
com.xxdxxs.utils.EntityMapper
;
import
com.xxdxxs.utils.EntityMapper
;
import
com.xxdxxs.utils.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.stream.IntStream
;
import
java.util.stream.Stream
;
@Service
@Service
public
class
ItemTagQrCodeServiceImpl
implements
ItemTagQrCodeService
{
public
class
ItemTagQrCodeServiceImpl
implements
ItemTagQrCodeService
{
...
@@ -39,25 +53,37 @@ public class ItemTagQrCodeServiceImpl implements ItemTagQrCodeService {
...
@@ -39,25 +53,37 @@ public class ItemTagQrCodeServiceImpl implements ItemTagQrCodeService {
@Autowired
@Autowired
SupplierItemDao
supplierItemDao
;
SupplierItemDao
supplierItemDao
;
@Autowired
CategoryDao
categoryDao
;
@Autowired
CacheUtil
cacheUtil
;
@Autowired
SupplierItemService
supplierItemService
;
@Override
@Override
public
Result
createQrCode
(
ItemTag
Operat
eRequestDto
dto
)
{
public
Result
createQrCode
(
ItemTag
QrCod
eRequestDto
dto
)
{
try
{
try
{
Category
category
=
categoryDao
.
findById
(
dto
.
getCategoryId
());
Date
now
=
new
Date
();
Date
now
=
new
Date
();
for
(
int
i
=
0
;
i
<
dto
.
getCodeNum
();
i
++)
{
String
code
=
UUID
.
fastUUID
().
toString
(
true
);
String
code
=
UUID
.
fastUUID
().
toString
(
true
);
ItemTagQrCode
itemTagQrCode
=
new
ItemTagQrCode
();
ItemTagQrCode
itemTagQrCode
=
new
ItemTagQrCode
();
itemTagQrCode
.
setCode
(
code
);
itemTagQrCode
.
setCode
(
code
);
itemTagQrCode
.
setCategoryId
(
1774
);
itemTagQrCode
.
setCategoryId
(
dto
.
getCategoryId
()
);
itemTagQrCode
.
setCategoryName
(
"开元通宝"
);
itemTagQrCode
.
setCategoryName
(
category
.
getName
()
);
itemTagQrCode
.
setCreateTime
(
now
);
itemTagQrCode
.
setCreateTime
(
now
);
//获取页面短链
//获取页面短链
String
url
=
wxAppletApi
.
getUrlLink
(
"/pages/detail/index"
,
"code="
+
code
);
String
url
=
wxAppletApi
.
getUrlLink
(
"/pages/detail/index"
,
"code="
+
code
);
String
qrCode
=
QRCodeUtil
.
createCodeToBase64
(
url
);
String
qrCode
=
QRCodeUtil
.
createCodeToBase64
(
url
);
String
keyName
=
CommConsts
.
UPLOAD_PRE_DIRECTORY
+
code
;
String
keyName
=
CommConsts
.
UPLOAD_PRE_DIRECTORY
+
code
;
String
qrCodeUrl
=
qiniuStorage
.
storeItemQrcodeBase64Str
(
qrCode
.
trim
(),
keyName
);
String
qrCodeUrl
=
qiniuStorage
.
storeItemQrcodeBase64Str
(
qrCode
.
trim
(),
keyName
);
logger
.
info
(
"上传的商品标签二维码url :{}"
,
qrCodeUrl
);
logger
.
info
(
"上传的商品标签二维码url :{}"
,
qrCodeUrl
);
itemTagQrCode
.
setQrCode
(
qrCodeUrl
);
itemTagQrCode
.
setQrCode
(
qrCodeUrl
);
itemTagQrCodeDao
.
insert
(
itemTagQrCode
);
itemTagQrCodeDao
.
insert
(
itemTagQrCode
);
return
Result
.
success
(
qrCodeUrl
);
}
return
Result
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"创建标签二维码失败"
,
e
);
logger
.
error
(
"创建标签二维码失败"
,
e
);
}
}
...
@@ -70,15 +96,69 @@ public class ItemTagQrCodeServiceImpl implements ItemTagQrCodeService {
...
@@ -70,15 +96,69 @@ public class ItemTagQrCodeServiceImpl implements ItemTagQrCodeService {
try
{
try
{
ItemTagQrCode
itemTagQrCode
=
itemTagQrCodeDao
.
findByCode
(
dto
.
getCode
());
ItemTagQrCode
itemTagQrCode
=
itemTagQrCodeDao
.
findByCode
(
dto
.
getCode
());
if
(
itemTagQrCode
!=
null
&&
itemTagQrCode
.
getItemId
()
!=
null
)
{
if
(
itemTagQrCode
!=
null
&&
itemTagQrCode
.
getItemId
()
!=
null
)
{
SupplierItem
supplierItem
=
supplierItemDao
.
findById
(
itemTagQrCode
.
getItemId
());
SupplierItemRequestDto
supplierItemRequestDto
=
new
SupplierItemRequestDto
();
SupplierItemVo
supplierItemVo
=
new
SupplierItemVo
();
supplierItemRequestDto
.
setId
(
itemTagQrCode
.
getItemId
());
EntityMapper
.
copyAttribute
(
supplierItem
,
supplierItemVo
);
supplierItemRequestDto
.
setItemId
(
itemTagQrCode
.
getItemId
());
return
Result
.
success
(
supplierItemVo
);
supplierItemRequestDto
.
setUserId
(
dto
.
getUserId
());
Result
result
=
supplierItemService
.
findCollectionItemDetail
(
supplierItemRequestDto
);
return
result
;
}
}
return
Result
.
success
(
itemTagQrCode
);
int
categoryId
=
itemTagQrCode
.
getCategoryId
();
Category
category
=
categoryDao
.
findById
(
categoryId
);
return
Result
.
success
(
category
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"根据二维码code查询信息失败"
,
e
);
logger
.
error
(
"根据二维码code查询信息失败"
,
e
);
}
}
return
Result
.
failed
();
return
Result
.
failed
();
}
}
@Override
public
Result
bindItem
(
ItemTagQrCodeRequestDto
dto
)
{
try
{
ItemTagQrCode
itemTagQrCode
=
itemTagQrCodeDao
.
findByCode
(
dto
.
getCode
());
int
categoryId
=
itemTagQrCode
.
getCategoryId
();
//先上传商品
SupplierItem
supplierItem
=
new
SupplierItem
();
//查询类目信息
Category
category
=
categoryDao
.
findById
(
categoryId
);
EntityMapper
.
copyAttribute
(
dto
,
supplierItem
);
//查询分类的上级节点
Category
parentCategory
=
categoryDao
.
findById
(
category
.
getPid
());
supplierItem
.
setName
(
parentCategory
.
getName
()
+
"-"
+
category
.
getName
());
supplierItem
.
setDescription
(
category
.
getIntroduction
());
supplierItem
.
setDistributionPrice
(
0L
);
supplierItem
.
setSupplyPrice
(
0L
);
supplierItem
.
setRebate
(
new
BigDecimal
(
"0"
));
if
(!
CollectionUtils
.
isEmpty
(
dto
.
getImages
()))
{
supplierItem
.
setImages
(
String
.
join
(
";"
,
dto
.
getImages
()));
}
supplierItem
.
setSort
(
1
);
supplierItem
.
setBuyLimitNum
(-
1
);
supplierItem
.
setIsAbleSale
(
false
);
supplierItem
.
setIsOnSale
(
false
);
supplierItem
.
setStock
(
1
);
supplierItem
.
setIsOnSale
(
false
);
Date
now
=
new
Date
();
supplierItem
.
setCreateTime
(
now
);
supplierItem
.
setUpdateTime
(
now
);
supplierItem
.
setIsDeleted
(
false
);
supplierItem
.
setDistributionPrice
(
0L
);
supplierItem
.
setType
(
DistributionEnum
.
DistributionTypeEnum
.
COLLECT
.
getCode
());
supplierItem
.
setStatus
(
SupplierItemEnum
.
StatusEnum
.
COMMON
.
getCode
());
supplierItem
.
setCreatorId
(
dto
.
getUserId
());
long
itemId
=
supplierItemDao
.
insert
(
supplierItem
);
//二维码绑定商品
ItemTagQrCode
updateDto
=
new
ItemTagQrCode
();
updateDto
.
setId
(
itemTagQrCode
.
getId
());
updateDto
.
setItemId
(
itemId
);
itemTagQrCodeDao
.
updateByPrimaryKey
(
updateDto
);
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"用户上传商品图片,code绑定商品"
,
e
);
}
return
Result
.
failed
();
}
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/ItemTagQrCodeService.java
View file @
9564182c
...
@@ -7,10 +7,10 @@ import com.wwdz.ch.wx.entity.request.ItemTagOperateRequestDto;
...
@@ -7,10 +7,10 @@ import com.wwdz.ch.wx.entity.request.ItemTagOperateRequestDto;
public
interface
ItemTagQrCodeService
{
public
interface
ItemTagQrCodeService
{
/**
/**
* 批量生成
页面
二维码
* 批量生成二维码
* @return
* @return
*/
*/
Result
createQrCode
(
ItemTag
Operat
eRequestDto
dto
);
Result
createQrCode
(
ItemTag
QrCod
eRequestDto
dto
);
/**
/**
...
@@ -19,4 +19,12 @@ public interface ItemTagQrCodeService {
...
@@ -19,4 +19,12 @@ public interface ItemTagQrCodeService {
* @return
* @return
*/
*/
Result
findByCode
(
ItemTagQrCodeRequestDto
dto
);
Result
findByCode
(
ItemTagQrCodeRequestDto
dto
);
/**
* 用户上传商品图片,code绑定商品
* @param dto
* @return
*/
Result
bindItem
(
ItemTagQrCodeRequestDto
dto
);
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/ItemTagQrCodeController.java
0 → 100644
View file @
9564182c
package
com.wwdz.ch.wx.web
;
import
com.alibaba.fastjson.JSON
;
import
com.wwdz.ch.core.consts.ResultCode
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.ItemTagQrCodeRequestDto
;
import
com.wwdz.ch.wx.service.ItemTagQrCodeService
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"/wx/itemTagQrCode"
)
public
class
ItemTagQrCodeController
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ItemTagQrCodeController
.
class
);
@Autowired
ItemTagQrCodeService
itemTagQrCodeService
;
@ApiOperation
(
value
=
"上传商品到自己的藏馆,绑定二维码"
)
@PostMapping
(
"/uploadItemToSelf"
)
public
Result
uploadItemToSelf
(
@RequestBody
ItemTagQrCodeRequestDto
dto
)
{
logger
.
info
(
"上传商品到自己的藏馆,绑定二维码,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
return
itemTagQrCodeService
.
bindItem
(
dto
);
}
@ApiOperation
(
value
=
"根据二维码code查询信息"
)
@PostMapping
(
"/findByCode"
)
public
Result
findByCode
(
@RequestBody
ItemTagQrCodeRequestDto
dto
)
{
logger
.
info
(
"根据二维码code查询信息,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
StringUtils
.
isEmpty
(
dto
.
getCode
())
||
dto
.
getUserId
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
return
itemTagQrCodeService
.
findByCode
(
dto
);
}
@ApiOperation
(
value
=
"批量生成二维码"
)
@PostMapping
(
"/createQrCode"
)
public
Result
createQrCode
(
@RequestBody
ItemTagQrCodeRequestDto
dto
)
{
logger
.
info
(
"批量生成二维码,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getCategoryId
()
==
null
||
dto
.
getCodeNum
()
==
null
)
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
return
itemTagQrCodeService
.
createQrCode
(
dto
);
}
}
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