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
03f0128d
Commit
03f0128d
authored
Apr 09, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
藏品详情新增标签
parent
8799a5d0
Changes
22
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
2845 additions
and
7 deletions
+2845
-7
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
...ore/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
+5
-0
ch-core/src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
...src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
+2
-1
ch-dao/src/main/java/com/wwdz/ch/db/dao/CollectionBookSortDao.java
...c/main/java/com/wwdz/ch/db/dao/CollectionBookSortDao.java
+15
-0
ch-dao/src/main/java/com/wwdz/ch/db/dao/CollectorWhiteListDao.java
...c/main/java/com/wwdz/ch/db/dao/CollectorWhiteListDao.java
+8
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/CollectionBookSort.java
...c/main/java/com/wwdz/ch/db/domain/CollectionBookSort.java
+247
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/CollectionBookSortExample.java
...java/com/wwdz/ch/db/domain/CollectionBookSortExample.java
+566
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/CollectorWhiteList.java
...c/main/java/com/wwdz/ch/db/domain/CollectorWhiteList.java
+255
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/CollectorWhiteListExample.java
...java/com/wwdz/ch/db/domain/CollectorWhiteListExample.java
+831
-0
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/CollectionBookRequestDto.java
...db/dto/request/distribution/CollectionBookRequestDto.java
+5
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/CollectionBookSortDaoImpl.java
...n/java/com/wwdz/ch/db/impl/CollectionBookSortDaoImpl.java
+46
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/CollectorWhiteListDaoImpl.java
...n/java/com/wwdz/ch/db/impl/CollectorWhiteListDaoImpl.java
+23
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/CollectionBookSortMapper.java
.../java/com/wwdz/ch/db/mapper/CollectionBookSortMapper.java
+84
-0
ch-dao/src/main/java/com/wwdz/ch/db/mapper/CollectorWhiteListMapper.java
.../java/com/wwdz/ch/db/mapper/CollectorWhiteListMapper.java
+69
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/CollectionBookSortMapper.xml
...ources/com/wwdz/ch/db/mapper/CollectionBookSortMapper.xml
+331
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/CollectorWhiteListMapper.xml
...ources/com/wwdz/ch/db/mapper/CollectorWhiteListMapper.xml
+291
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/constant/CollectionBookConstants.java
...java/com/wwdz/ch/wx/constant/CollectionBookConstants.java
+9
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
...pi/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
+7
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/CollectionBookServiceImpl.java
...dz/ch/wx/impl/distribution/CollectionBookServiceImpl.java
+22
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
+9
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
...wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
+1
-2
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/CollectionBookService.java
...wdz/ch/wx/service/distribution/CollectionBookService.java
+7
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/CollectionBookController.java
...wwdz/ch/wx/web/distribution/CollectionBookController.java
+12
-0
No files found.
ch-core/src/main/java/com/wwdz/ch/core/consts/CommConsts.java
View file @
03f0128d
...
...
@@ -45,6 +45,11 @@ public interface CommConsts {
*/
public
static
final
String
DEFAULT_AVATAR_URL
=
"https://cdn.wanwudezhi.com/mall-portal/image/4337400862"
;
/**
* 系统默认用户背景URL
*/
public
static
final
String
DEFAULT_BACKGROUND_URL
=
"https://cdn.wanwudezhi.com/static/web-static/image/1c679aa4e27789e491c070d52577efb1_1125x480.png"
;
}
ch-core/src/main/java/com/wwdz/ch/core/entity/SupplierItemVo.java
View file @
03f0128d
package
com.wwdz.ch.core.entity
;
import
com.wwdz.ch.db.domain.distribution.CollectionItemsRelation
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
import
java.util.Date
;
...
...
@@ -232,7 +233,7 @@ public class SupplierItemVo implements Entity {
/**
* 商品所属标签id
*/
private
List
<
Long
>
bookIdList
;
private
List
<
CollectionItemsRelation
>
bookIdList
;
/**
* 商家自购价
...
...
ch-dao/src/main/java/com/wwdz/ch/db/dao/CollectionBookSortDao.java
0 → 100644
View file @
03f0128d
package
com.wwdz.ch.db.dao
;
import
com.wwdz.ch.db.domain.BidRecord
;
import
com.wwdz.ch.db.domain.CollectionBookSort
;
public
interface
CollectionBookSortDao
{
int
add
(
CollectionBookSort
collectionBookSort
);
int
update
(
long
userId
,
String
sortInfo
);
CollectionBookSort
find
(
long
userId
);
boolean
isExisted
(
long
userId
);
}
ch-dao/src/main/java/com/wwdz/ch/db/dao/CollectorWhiteListDao.java
0 → 100644
View file @
03f0128d
package
com.wwdz.ch.db.dao
;
public
interface
CollectorWhiteListDao
{
boolean
isExisted
(
long
collectorId
);
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/CollectionBookSort.java
0 → 100644
View file @
03f0128d
package
com.wwdz.ch.db.domain
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/04/09
*/
@Data
public
class
CollectionBookSort
implements
Entity
{
private
Integer
id
;
/**
* 用户id
*/
private
Long
userId
;
/**
* 收藏标签顺序,逗号分隔
*/
private
String
sortInfo
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", sortInfo="
).
append
(
sortInfo
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
CollectionBookSort
other
=
(
CollectionBookSort
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getUserId
()
==
null
?
other
.
getUserId
()
==
null
:
this
.
getUserId
().
equals
(
other
.
getUserId
()))
&&
(
this
.
getSortInfo
()
==
null
?
other
.
getSortInfo
()
==
null
:
this
.
getSortInfo
().
equals
(
other
.
getSortInfo
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
hashCode
());
result
=
prime
*
result
+
((
getSortInfo
()
==
null
)
?
0
:
getSortInfo
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
sortInfo
(
"sort_info"
,
"sortInfo"
,
"LONGVARCHAR"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/CollectionBookSortExample.java
0 → 100644
View file @
03f0128d
This diff is collapsed.
Click to expand it.
ch-dao/src/main/java/com/wwdz/ch/db/domain/CollectorWhiteList.java
0 → 100644
View file @
03f0128d
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/04/09
*/
@Data
public
class
CollectorWhiteList
implements
Entity
{
private
Integer
id
;
/**
* 藏家id
*/
private
Long
collectorId
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 是否有效
*/
private
Boolean
isValid
;
private
static
final
long
serialVersionUID
=
1L
;
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", collectorId="
).
append
(
collectorId
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", isValid="
).
append
(
isValid
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
@Override
public
boolean
equals
(
Object
that
)
{
if
(
this
==
that
)
{
return
true
;
}
if
(
that
==
null
)
{
return
false
;
}
if
(
getClass
()
!=
that
.
getClass
())
{
return
false
;
}
CollectorWhiteList
other
=
(
CollectorWhiteList
)
that
;
return
(
this
.
getId
()
==
null
?
other
.
getId
()
==
null
:
this
.
getId
().
equals
(
other
.
getId
()))
&&
(
this
.
getCollectorId
()
==
null
?
other
.
getCollectorId
()
==
null
:
this
.
getCollectorId
().
equals
(
other
.
getCollectorId
()))
&&
(
this
.
getCreateTime
()
==
null
?
other
.
getCreateTime
()
==
null
:
this
.
getCreateTime
().
equals
(
other
.
getCreateTime
()))
&&
(
this
.
getIsValid
()
==
null
?
other
.
getIsValid
()
==
null
:
this
.
getIsValid
().
equals
(
other
.
getIsValid
()));
}
@Override
public
int
hashCode
()
{
final
int
prime
=
31
;
int
result
=
1
;
result
=
prime
*
result
+
((
getId
()
==
null
)
?
0
:
getId
().
hashCode
());
result
=
prime
*
result
+
((
getCollectorId
()
==
null
)
?
0
:
getCollectorId
().
hashCode
());
result
=
prime
*
result
+
((
getCreateTime
()
==
null
)
?
0
:
getCreateTime
().
hashCode
());
result
=
prime
*
result
+
((
getIsValid
()
==
null
)
?
0
:
getIsValid
().
hashCode
());
return
result
;
}
/**
* This enum was generated by MyBatis Generator.
* This enum corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
collectorId
(
"collector_id"
,
"collectorId"
,
"BIGINT"
,
false
),
createTime
(
"create_time"
,
"createTime"
,
"TIMESTAMP"
,
false
),
isValid
(
"is_valid"
,
"isValid"
,
"BIT"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
BEGINNING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
static
final
String
ENDING_DELIMITER
=
"`"
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
column
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
boolean
isColumnNameDelimited
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
javaProperty
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
private
final
String
jdbcType
;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
value
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getValue
()
{
return
this
.
column
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJavaProperty
()
{
return
this
.
javaProperty
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getJdbcType
()
{
return
this
.
jdbcType
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
Column
(
String
column
,
String
javaProperty
,
String
jdbcType
,
boolean
isColumnNameDelimited
)
{
this
.
column
=
column
;
this
.
javaProperty
=
javaProperty
;
this
.
jdbcType
=
jdbcType
;
this
.
isColumnNameDelimited
=
isColumnNameDelimited
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
desc
()
{
return
this
.
getEscapedColumnName
()
+
" DESC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
asc
()
{
return
this
.
getEscapedColumnName
()
+
" ASC"
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
static
Column
[]
excludes
(
Column
...
excludes
)
{
ArrayList
<
Column
>
columns
=
new
ArrayList
<>(
Arrays
.
asList
(
Column
.
values
()));
if
(
excludes
!=
null
&&
excludes
.
length
>
0
)
{
columns
.
removeAll
(
new
ArrayList
<>(
Arrays
.
asList
(
excludes
)));
}
return
columns
.
toArray
(
new
Column
[]{});
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
String
getEscapedColumnName
()
{
if
(
this
.
isColumnNameDelimited
)
{
return
new
StringBuilder
().
append
(
BEGINNING_DELIMITER
).
append
(
this
.
column
).
append
(
ENDING_DELIMITER
).
toString
();
}
else
{
return
this
.
column
;
}
}
}
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/domain/CollectorWhiteListExample.java
0 → 100644
View file @
03f0128d
This diff is collapsed.
Click to expand it.
ch-dao/src/main/java/com/wwdz/ch/db/dto/request/distribution/CollectionBookRequestDto.java
View file @
03f0128d
...
...
@@ -52,4 +52,9 @@ public class CollectionBookRequestDto extends BaseRequestDto implements Entity
* 分享id
*/
private
String
shareRecordId
;
/**
* 排序信息
*/
private
String
sortInfo
;
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/CollectionBookSortDaoImpl.java
0 → 100644
View file @
03f0128d
package
com.wwdz.ch.db.impl
;
import
com.wwdz.ch.db.dao.CollectionBookSortDao
;
import
com.wwdz.ch.db.domain.CollectionBookSort
;
import
com.wwdz.ch.db.domain.CollectionBookSortExample
;
import
com.wwdz.ch.db.mapper.CollectionBookSortMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
CollectionBookSortDaoImpl
implements
CollectionBookSortDao
{
@Autowired
CollectionBookSortMapper
collectionBookSortMapper
;
@Override
public
int
add
(
CollectionBookSort
collectionBookSort
)
{
return
collectionBookSortMapper
.
insert
(
collectionBookSort
);
}
@Override
public
int
update
(
long
userId
,
String
sortInfo
)
{
CollectionBookSort
collectionBookSort
=
new
CollectionBookSort
();
collectionBookSort
.
setSortInfo
(
sortInfo
);
CollectionBookSortExample
example
=
new
CollectionBookSortExample
();
CollectionBookSortExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
);
return
collectionBookSortMapper
.
updateByExampleSelective
(
collectionBookSort
,
example
);
}
@Override
public
CollectionBookSort
find
(
long
userId
)
{
CollectionBookSortExample
example
=
new
CollectionBookSortExample
();
CollectionBookSortExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
);
return
collectionBookSortMapper
.
selectOneByExampleWithBLOBs
(
example
);
}
@Override
public
boolean
isExisted
(
long
userId
)
{
CollectionBookSortExample
example
=
new
CollectionBookSortExample
();
CollectionBookSortExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
);
return
collectionBookSortMapper
.
countByExample
(
example
)
>
0
;
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/CollectorWhiteListDaoImpl.java
0 → 100644
View file @
03f0128d
package
com.wwdz.ch.db.impl
;
import
com.wwdz.ch.db.dao.CollectorWhiteListDao
;
import
com.wwdz.ch.db.domain.CollectorWhiteListExample
;
import
com.wwdz.ch.db.mapper.CollectorWhiteListMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
CollectorWhiteListDaoImpl
implements
CollectorWhiteListDao
{
@Autowired
CollectorWhiteListMapper
collectorWhiteListMapper
;
@Override
public
boolean
isExisted
(
long
collectorId
)
{
CollectorWhiteListExample
example
=
new
CollectorWhiteListExample
();
CollectorWhiteListExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andCollectorIdEqualTo
(
collectorId
);
criteria
.
andIsValidEqualTo
(
true
);
return
collectorWhiteListMapper
.
countByExample
(
example
)
>
0
;
}
}
ch-dao/src/main/java/com/wwdz/ch/db/mapper/CollectionBookSortMapper.java
0 → 100644
View file @
03f0128d
package
com.wwdz.ch.db.mapper
;
import
com.wwdz.ch.db.domain.CollectionBookSort
;
import
com.wwdz.ch.db.domain.CollectionBookSortExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
CollectionBookSortMapper
{
long
countByExample
(
CollectionBookSortExample
example
);
int
deleteByExample
(
CollectionBookSortExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
CollectionBookSort
record
);
int
insertSelective
(
CollectionBookSort
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionBookSort
selectOneByExample
(
CollectionBookSortExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionBookSort
selectOneByExampleSelective
(
@Param
(
"example"
)
CollectionBookSortExample
example
,
@Param
(
"selective"
)
CollectionBookSort
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionBookSort
selectOneByExampleWithBLOBs
(
CollectionBookSortExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
CollectionBookSort
>
selectByExampleSelective
(
@Param
(
"example"
)
CollectionBookSortExample
example
,
@Param
(
"selective"
)
CollectionBookSort
.
Column
...
selective
);
List
<
CollectionBookSort
>
selectByExampleWithBLOBs
(
CollectionBookSortExample
example
);
List
<
CollectionBookSort
>
selectByExample
(
CollectionBookSortExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collection_book_sort
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectionBookSort
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
CollectionBookSort
.
Column
...
selective
);
CollectionBookSort
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
CollectionBookSort
record
,
@Param
(
"example"
)
CollectionBookSortExample
example
);
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
CollectionBookSort
record
,
@Param
(
"example"
)
CollectionBookSortExample
example
);
int
updateByExample
(
@Param
(
"record"
)
CollectionBookSort
record
,
@Param
(
"example"
)
CollectionBookSortExample
example
);
int
updateByPrimaryKeySelective
(
CollectionBookSort
record
);
int
updateByPrimaryKeyWithBLOBs
(
CollectionBookSort
record
);
int
updateByPrimaryKey
(
CollectionBookSort
record
);
}
\ No newline at end of file
ch-dao/src/main/java/com/wwdz/ch/db/mapper/CollectorWhiteListMapper.java
0 → 100644
View file @
03f0128d
package
com.wwdz.ch.db.mapper
;
import
com.wwdz.ch.db.domain.CollectorWhiteList
;
import
com.wwdz.ch.db.domain.CollectorWhiteListExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
CollectorWhiteListMapper
{
long
countByExample
(
CollectorWhiteListExample
example
);
int
deleteByExample
(
CollectorWhiteListExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
CollectorWhiteList
record
);
int
insertSelective
(
CollectorWhiteList
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectorWhiteList
selectOneByExample
(
CollectorWhiteListExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectorWhiteList
selectOneByExampleSelective
(
@Param
(
"example"
)
CollectorWhiteListExample
example
,
@Param
(
"selective"
)
CollectorWhiteList
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
CollectorWhiteList
>
selectByExampleSelective
(
@Param
(
"example"
)
CollectorWhiteListExample
example
,
@Param
(
"selective"
)
CollectorWhiteList
.
Column
...
selective
);
List
<
CollectorWhiteList
>
selectByExample
(
CollectorWhiteListExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table collector_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
CollectorWhiteList
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
CollectorWhiteList
.
Column
...
selective
);
CollectorWhiteList
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
CollectorWhiteList
record
,
@Param
(
"example"
)
CollectorWhiteListExample
example
);
int
updateByExample
(
@Param
(
"record"
)
CollectorWhiteList
record
,
@Param
(
"example"
)
CollectorWhiteListExample
example
);
int
updateByPrimaryKeySelective
(
CollectorWhiteList
record
);
int
updateByPrimaryKey
(
CollectorWhiteList
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/CollectionBookSortMapper.xml
0 → 100644
View file @
03f0128d
This diff is collapsed.
Click to expand it.
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/CollectorWhiteListMapper.xml
0 → 100644
View file @
03f0128d
This diff is collapsed.
Click to expand it.
ch-wx-api/src/main/java/com/wwdz/ch/wx/constant/CollectionBookConstants.java
0 → 100644
View file @
03f0128d
package
com.wwdz.ch.wx.constant
;
/**
* 藏家默认展示的标签
*/
public
class
CollectionBookConstants
{
private
String
saleing
;
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
View file @
03f0128d
...
...
@@ -162,8 +162,13 @@ public class UserServiceImpl implements UserService {
result
.
put
(
"token"
,
dto
.
getToken
());
result
.
put
(
"tokenExpire"
,
userToken
.
getExpireTime
().
toString
());
result
.
put
(
"isInvited"
,
true
);
User
user
=
userDao
.
queryById
(
dto
.
getUserId
());
logger
.
info
(
"登录用户的信息:{}"
,
JsonUtils
.
from
(
user
));
CloudServerResponse
<
com
.
wwdz
.
user
.
api
.
model
.
user
.
User
>
userCloudServerResponse
=
userReadService
.
getUserIsNotDelete
(
dto
.
getUserId
());
if
(
userCloudServerResponse
.
getCode
()
!=
1001
)
{
return
Result
.
failed
(
"用户信息初始化失败"
);
}
com
.
wwdz
.
user
.
api
.
model
.
user
.
User
wUser
=
userCloudServerResponse
.
getResult
();
User
user
=
User
.
of
(
wUser
);
logger
.
info
(
">>>>>>> 登录用户的信息:{}"
,
JsonUtils
.
from
(
user
));
String
phone
=
user
.
getMobile
();
//如果用户手机号为空,则调用微信接口查询出手机号进行保存
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/CollectionBookServiceImpl.java
View file @
03f0128d
...
...
@@ -2,9 +2,11 @@ package com.wwdz.ch.wx.impl.distribution;
import
com.github.pagehelper.PageInfo
;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dao.CollectionBookSortDao
;
import
com.wwdz.ch.db.dao.distribution.CollectionBookDao
;
import
com.wwdz.ch.db.dao.distribution.CollectionItemsRelationDao
;
import
com.wwdz.ch.db.dao.distribution.CollectionShareRecordDao
;
import
com.wwdz.ch.db.domain.CollectionBookSort
;
import
com.wwdz.ch.db.domain.distribution.CollectionBook
;
import
com.wwdz.ch.db.domain.distribution.CollectionShareRecord
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionBookRequestDto
;
...
...
@@ -33,6 +35,9 @@ public class CollectionBookServiceImpl implements CollectionBookService {
@Autowired
CollectionShareRecordDao
collectionShareRecordDao
;
@Autowired
CollectionBookSortDao
collectionBookSortDao
;
@Override
public
Result
create
(
CollectionBookRequestDto
dto
)
{
try
{
...
...
@@ -127,6 +132,21 @@ public class CollectionBookServiceImpl implements CollectionBookService {
}
@Override
public
Result
updateSort
(
CollectionBookRequestDto
dto
)
{
try
{
if
(!
collectionBookSortDao
.
isExisted
(
dto
.
getUserId
()))
{
CollectionBookSort
collectionBookSort
=
new
CollectionBookSort
();
collectionBookSort
.
setUserId
(
dto
.
getUserId
());
collectionBookSort
.
setSortInfo
(
dto
.
getSortInfo
());
collectionBookSortDao
.
add
(
collectionBookSort
);
}
else
{
collectionBookSortDao
.
update
(
dto
.
getUserId
(),
dto
.
getSortInfo
());
}
return
Result
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"标签顺序修改 error: {}"
,
e
);
}
return
Result
.
failed
();
}
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
View file @
03f0128d
...
...
@@ -7,6 +7,7 @@ import com.wwdz.ch.core.util.CacheUtil;
import
com.wwdz.ch.core.util.PriceUtil
;
import
com.wwdz.ch.core.util.RedisUtils
;
import
com.wwdz.ch.db.bean.DistributionOrderNum
;
import
com.wwdz.ch.db.dao.FollowFansRecordDao
;
import
com.wwdz.ch.db.dao.SwitchDao
;
import
com.wwdz.ch.db.dao.distribution.*
;
import
com.wwdz.ch.db.domain.User
;
...
...
@@ -68,6 +69,9 @@ public class SelfPageServiceImpl implements SelfPageService {
@Autowired
SwitchDao
switchDao
;
@Autowired
FollowFansRecordDao
followFansRecordDao
;
@Override
...
...
@@ -179,6 +183,11 @@ public class SelfPageServiceImpl implements SelfPageService {
User
user
=
cacheUtil
.
getAppletUserById
(
itemUserId
);
map
.
put
(
"avatar"
,
StringUtils
.
isEmpty
(
user
.
getAvatar
())
?
CommConsts
.
DEFAULT_AVATAR_URL
:
user
.
getAvatar
());
map
.
put
(
"name"
,
StringUtils
.
isEmpty
(
user
.
getNickname
())
?
"微信用户"
:
user
.
getNickname
());
map
.
put
(
"background"
,
StringUtils
.
isEmpty
(
user
.
getBackground
())
?
CommConsts
.
DEFAULT_BACKGROUND_URL
:
user
.
getBackground
());
map
.
put
(
"profile"
,
user
.
getProfile
());
long
fansNum
=
followFansRecordDao
.
countFans
(
itemUserId
);
map
.
put
(
"fansNum"
,
fansNum
);
map
.
put
(
"targetUserId"
,
itemUserId
);
long
count
=
supplierItemDao
.
countByCreatorId
(
itemUserId
);
map
.
put
(
"count"
,
count
);
return
Result
.
success
(
map
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SupplierItemServiceImpl.java
View file @
03f0128d
...
...
@@ -702,8 +702,7 @@ public class SupplierItemServiceImpl implements SupplierItemService {
supplierItemVo
.
setCollectedNum
((
int
)
countNum
);
//查询商品所属标签
List
<
CollectionItemsRelation
>
collectionItemsRelations
=
collectionItemsRelationDao
.
findByItemId
(
itemId
);
List
<
Long
>
bookIds
=
collectionItemsRelations
.
stream
().
map
(
CollectionItemsRelation:
:
getCollectionBookId
).
collect
(
Collectors
.
toList
());
supplierItemVo
.
setBookIdList
(
bookIds
);
supplierItemVo
.
setBookIdList
(
collectionItemsRelations
);
return
Result
.
success
(
supplierItemVo
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询上传的藏品详情 error : {}"
,
e
);
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/service/distribution/CollectionBookService.java
View file @
03f0128d
...
...
@@ -35,4 +35,11 @@ public interface CollectionBookService {
* @return
*/
Result
delete
(
CollectionBookRequestDto
dto
);
/**
* 标签排序
* @param dto
* @return
*/
Result
updateSort
(
CollectionBookRequestDto
dto
);
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/web/distribution/CollectionBookController.java
View file @
03f0128d
...
...
@@ -5,6 +5,7 @@ import com.wwdz.ch.core.consts.ResultCode;
import
com.wwdz.ch.core.type.Result
;
import
com.wwdz.ch.db.dto.request.distribution.CollectionBookRequestDto
;
import
com.wwdz.ch.wx.service.distribution.CollectionBookService
;
import
com.xxdxxs.utils.StringUtils
;
import
io.swagger.annotations.ApiOperation
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -64,4 +65,15 @@ public class CollectionBookController {
}
return
collectionBookService
.
delete
(
dto
);
}
@ApiOperation
(
value
=
"藏品标签排序"
)
@PostMapping
(
"/updateSort"
)
public
Result
updateSort
(
@RequestBody
CollectionBookRequestDto
dto
)
{
logger
.
info
(
"藏品标签排序,请求参数:{}"
,
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getUserId
()
==
null
||
StringUtils
.
isEmpty
(
dto
.
getSortInfo
()))
{
return
Result
.
failed
(
ResultCode
.
PARAM_ERROR
);
}
return
collectionBookService
.
updateSort
(
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