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
75d2de84
Commit
75d2de84
authored
Oct 22, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打印标签权限
parent
f2c0b1c7
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1331 additions
and
5 deletions
+1331
-5
ch-dao/src/main/java/com/wwdz/ch/db/dao/TagOperateWhiteListDao.java
.../main/java/com/wwdz/ch/db/dao/TagOperateWhiteListDao.java
+6
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/TagOperateWhiteList.java
.../main/java/com/wwdz/ch/db/domain/TagOperateWhiteList.java
+239
-0
ch-dao/src/main/java/com/wwdz/ch/db/domain/TagOperateWhiteListExample.java
...ava/com/wwdz/ch/db/domain/TagOperateWhiteListExample.java
+698
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/TagOperateWhiteListDaoImpl.java
.../java/com/wwdz/ch/db/impl/TagOperateWhiteListDaoImpl.java
+23
-0
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
...com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
+2
-1
ch-dao/src/main/java/com/wwdz/ch/db/mapper/TagOperateWhiteListMapper.java
...java/com/wwdz/ch/db/mapper/TagOperateWhiteListMapper.java
+69
-0
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/TagOperateWhiteListMapper.xml
...urces/com/wwdz/ch/db/mapper/TagOperateWhiteListMapper.xml
+274
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/distribution/SelfPageInfoVo.java
...com/wwdz/ch/wx/entity/vo/distribution/SelfPageInfoVo.java
+5
-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
+3
-0
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
...com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
+12
-4
No files found.
ch-dao/src/main/java/com/wwdz/ch/db/dao/TagOperateWhiteListDao.java
0 → 100644
View file @
75d2de84
package
com.wwdz.ch.db.dao
;
public
interface
TagOperateWhiteListDao
{
boolean
isExisted
(
long
userId
);
}
ch-dao/src/main/java/com/wwdz/ch/db/domain/TagOperateWhiteList.java
0 → 100644
View file @
75d2de84
package
com.wwdz.ch.db.domain
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
com.xxdxxs.entity.Entity
;
import
lombok.Data
;
/**
* @author shiyu
* @date 2024/10/22
*/
@Data
public
class
TagOperateWhiteList
implements
Entity
{
private
Integer
id
;
private
Long
userId
;
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
(
", userId="
).
append
(
userId
);
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
;
}
TagOperateWhiteList
other
=
(
TagOperateWhiteList
)
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
.
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
+
((
getUserId
()
==
null
)
?
0
:
getUserId
().
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 tag_operate_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public
enum
Column
{
id
(
"id"
,
"id"
,
"INTEGER"
,
false
),
userId
(
"user_id"
,
"userId"
,
"BIGINT"
,
false
),
isValid
(
"is_valid"
,
"isValid"
,
"BIT"
,
false
);
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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 tag_operate_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/TagOperateWhiteListExample.java
0 → 100644
View file @
75d2de84
This diff is collapsed.
Click to expand it.
ch-dao/src/main/java/com/wwdz/ch/db/impl/TagOperateWhiteListDaoImpl.java
0 → 100644
View file @
75d2de84
package
com.wwdz.ch.db.impl
;
import
com.wwdz.ch.db.dao.TagOperateWhiteListDao
;
import
com.wwdz.ch.db.domain.TagOperateWhiteListExample
;
import
com.wwdz.ch.db.mapper.TagOperateWhiteListMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Repository
;
@Repository
public
class
TagOperateWhiteListDaoImpl
implements
TagOperateWhiteListDao
{
@Autowired
TagOperateWhiteListMapper
tagOperateWhiteListMapper
;
@Override
public
boolean
isExisted
(
long
userId
)
{
TagOperateWhiteListExample
example
=
new
TagOperateWhiteListExample
();
TagOperateWhiteListExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andUserIdEqualTo
(
userId
);
criteria
.
andIsValidEqualTo
(
true
);
return
tagOperateWhiteListMapper
.
countByExample
(
example
)
>
0
;
}
}
ch-dao/src/main/java/com/wwdz/ch/db/impl/distribution/SupplierItemDaoImpl.java
View file @
75d2de84
...
...
@@ -75,7 +75,8 @@ public class SupplierItemDaoImpl implements SupplierItemDao {
JdbcHelper
.
ifPresent
(
dto
.
getIsOnSale
(),
criteria:
:
andIsOnSaleEqualTo
);
// JdbcHelper.ifPresent(dto.getIsDeleted(), criteria::andIsDeletedEqualTo);
criteria
.
andIsDeletedEqualTo
(
false
);
supplierItemExample
.
setOrderByClause
(
" is_on_sale desc, stock desc, create_time desc"
);
// supplierItemExample.setOrderByClause(" is_on_sale desc, stock desc, create_time desc");
supplierItemExample
.
setOrderByClause
(
"create_time desc"
);
PageHelper
.
startPage
(
dto
.
getPage
(),
dto
.
getLimit
());
return
supplierItemMapper
.
selectByExampleWithBLOBs
(
supplierItemExample
);
}
...
...
ch-dao/src/main/java/com/wwdz/ch/db/mapper/TagOperateWhiteListMapper.java
0 → 100644
View file @
75d2de84
package
com.wwdz.ch.db.mapper
;
import
com.wwdz.ch.db.domain.TagOperateWhiteList
;
import
com.wwdz.ch.db.domain.TagOperateWhiteListExample
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
@Mapper
public
interface
TagOperateWhiteListMapper
{
long
countByExample
(
TagOperateWhiteListExample
example
);
int
deleteByExample
(
TagOperateWhiteListExample
example
);
int
deleteByPrimaryKey
(
Integer
id
);
int
insert
(
TagOperateWhiteList
record
);
int
insertSelective
(
TagOperateWhiteList
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tag_operate_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
TagOperateWhiteList
selectOneByExample
(
TagOperateWhiteListExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tag_operate_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
TagOperateWhiteList
selectOneByExampleSelective
(
@Param
(
"example"
)
TagOperateWhiteListExample
example
,
@Param
(
"selective"
)
TagOperateWhiteList
.
Column
...
selective
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tag_operate_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
List
<
TagOperateWhiteList
>
selectByExampleSelective
(
@Param
(
"example"
)
TagOperateWhiteListExample
example
,
@Param
(
"selective"
)
TagOperateWhiteList
.
Column
...
selective
);
List
<
TagOperateWhiteList
>
selectByExample
(
TagOperateWhiteListExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tag_operate_white_list
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
TagOperateWhiteList
selectByPrimaryKeySelective
(
@Param
(
"id"
)
Integer
id
,
@Param
(
"selective"
)
TagOperateWhiteList
.
Column
...
selective
);
TagOperateWhiteList
selectByPrimaryKey
(
Integer
id
);
int
updateByExampleSelective
(
@Param
(
"record"
)
TagOperateWhiteList
record
,
@Param
(
"example"
)
TagOperateWhiteListExample
example
);
int
updateByExample
(
@Param
(
"record"
)
TagOperateWhiteList
record
,
@Param
(
"example"
)
TagOperateWhiteListExample
example
);
int
updateByPrimaryKeySelective
(
TagOperateWhiteList
record
);
int
updateByPrimaryKey
(
TagOperateWhiteList
record
);
}
\ No newline at end of file
ch-dao/src/main/resources/com/wwdz/ch/db/mapper/TagOperateWhiteListMapper.xml
0 → 100644
View file @
75d2de84
<?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.wwdz.ch.db.mapper.TagOperateWhiteListMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.wwdz.ch.db.domain.TagOperateWhiteList"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"is_valid"
jdbcType=
"BIT"
property=
"isValid"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<where>
<foreach
collection=
"oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Update_By_Example_Where_Clause"
>
<where>
<foreach
collection=
"example.oredCriteria"
item=
"criteria"
separator=
"or"
>
<if
test=
"criteria.valid"
>
<trim
prefix=
"("
prefixOverrides=
"and"
suffix=
")"
>
<foreach
collection=
"criteria.criteria"
item=
"criterion"
>
<choose>
<when
test=
"criterion.noValue"
>
and ${criterion.condition}
</when>
<when
test=
"criterion.singleValue"
>
and ${criterion.condition} #{criterion.value}
</when>
<when
test=
"criterion.betweenValue"
>
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when
test=
"criterion.listValue"
>
and ${criterion.condition}
<foreach
close=
")"
collection=
"criterion.value"
item=
"listItem"
open=
"("
separator=
","
>
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, user_id, is_valid
</sql>
<select
id=
"selectByExample"
parameterType=
"com.wwdz.ch.db.domain.TagOperateWhiteListExample"
resultMap=
"BaseResultMap"
>
select
<if
test=
"distinct"
>
distinct
</if>
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from tag_operate_white_list
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
</select>
<select
id=
"selectByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<if
test=
"example.distinct"
>
distinct
</if>
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, is_valid
</otherwise>
</choose>
from tag_operate_white_list
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
</select>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tag_operate_white_list
where id = #{id,jdbcType=INTEGER}
</select>
<select
id=
"selectByPrimaryKeySelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, is_valid
</otherwise>
</choose>
from tag_operate_white_list
where id = #{id,jdbcType=INTEGER}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Integer"
>
delete from tag_operate_white_list
where id = #{id,jdbcType=INTEGER}
</delete>
<delete
id=
"deleteByExample"
parameterType=
"com.wwdz.ch.db.domain.TagOperateWhiteListExample"
>
delete from tag_operate_white_list
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.wwdz.ch.db.domain.TagOperateWhiteList"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tag_operate_white_list (user_id, is_valid)
values (#{userId,jdbcType=BIGINT}, #{isValid,jdbcType=BIT})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.wwdz.ch.db.domain.TagOperateWhiteList"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tag_operate_white_list
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"isValid != null"
>
is_valid,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"userId != null"
>
#{userId,jdbcType=BIGINT},
</if>
<if
test=
"isValid != null"
>
#{isValid,jdbcType=BIT},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"com.wwdz.ch.db.domain.TagOperateWhiteListExample"
resultType=
"java.lang.Long"
>
select count(*) from tag_operate_white_list
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
</select>
<update
id=
"updateByExampleSelective"
parameterType=
"map"
>
update tag_operate_white_list
<set>
<if
test=
"record.id != null"
>
id = #{record.id,jdbcType=INTEGER},
</if>
<if
test=
"record.userId != null"
>
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if
test=
"record.isValid != null"
>
is_valid = #{record.isValid,jdbcType=BIT},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByExample"
parameterType=
"map"
>
update tag_operate_white_list
set id = #{record.id,jdbcType=INTEGER},
user_id = #{record.userId,jdbcType=BIGINT},
is_valid = #{record.isValid,jdbcType=BIT}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</update>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.wwdz.ch.db.domain.TagOperateWhiteList"
>
update tag_operate_white_list
<set>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=BIGINT},
</if>
<if
test=
"isValid != null"
>
is_valid = #{isValid,jdbcType=BIT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.wwdz.ch.db.domain.TagOperateWhiteList"
>
update tag_operate_white_list
set user_id = #{userId,jdbcType=BIGINT},
is_valid = #{isValid,jdbcType=BIT}
where id = #{id,jdbcType=INTEGER}
</update>
<select
id=
"selectOneByExample"
parameterType=
"com.wwdz.ch.db.domain.TagOperateWhiteListExample"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<include
refid=
"Base_Column_List"
/>
from tag_operate_white_list
<if
test=
"_parameter != null"
>
<include
refid=
"Example_Where_Clause"
/>
</if>
<if
test=
"orderByClause != null"
>
order by ${orderByClause}
</if>
limit 1
</select>
<select
id=
"selectOneByExampleSelective"
parameterType=
"map"
resultMap=
"BaseResultMap"
>
<!--
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
@project https://github.com/itfsw/mybatis-generator-plugin
-->
select
'true' as QUERYID,
<choose>
<when
test=
"selective != null and selective.length > 0"
>
<foreach
collection=
"selective"
item=
"column"
separator=
","
>
${column.escapedColumnName}
</foreach>
</when>
<otherwise>
id, user_id, is_valid
</otherwise>
</choose>
from tag_operate_white_list
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
<if
test=
"example.orderByClause != null"
>
order by ${example.orderByClause}
</if>
limit 1
</select>
</mapper>
\ No newline at end of file
ch-wx-api/src/main/java/com/wwdz/ch/wx/entity/vo/distribution/SelfPageInfoVo.java
View file @
75d2de84
...
...
@@ -75,5 +75,10 @@ public class SelfPageInfoVo implements Entity {
*/
private
Long
exchangeApplyOrderNum
;
/**
* 是否有制作标签的权限
*/
private
Boolean
tagOperateAble
=
false
;
}
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/UserServiceImpl.java
View file @
75d2de84
...
...
@@ -152,6 +152,9 @@ public class UserServiceImpl implements UserService {
@Autowired
CollectorWhiteListDao
collectorWhiteListDao
;
@Autowired
TagOperateWhiteListDao
tagOperateWhiteListDao
;
@Override
public
Result
finishLogin
(
UserRequestDto
dto
)
{
...
...
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/SelfPageServiceImpl.java
View file @
75d2de84
...
...
@@ -9,10 +9,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.CollectorWhiteListDao
;
import
com.wwdz.ch.db.dao.FollowFansRecordDao
;
import
com.wwdz.ch.db.dao.SwitchDao
;
import
com.wwdz.ch.db.dao.UserDao
;
import
com.wwdz.ch.db.dao.*
;
import
com.wwdz.ch.db.dao.distribution.*
;
import
com.wwdz.ch.db.dao.exchange.ExchangeApplyOrderDao
;
import
com.wwdz.ch.db.domain.User
;
...
...
@@ -91,6 +88,9 @@ public class SelfPageServiceImpl implements SelfPageService {
@Autowired
ExchangeApplyOrderDao
exchangeApplyOrderDao
;
@Autowired
TagOperateWhiteListDao
tagOperateWhiteListDao
;
/**
* PRE_EXCHANGE(6, "待寄至平台"),
* PRE_INSPECTION(8, "待平台验货"),
...
...
@@ -183,6 +183,10 @@ public class SelfPageServiceImpl implements SelfPageService {
}
}
selfPageInfoVo
.
setUserOfferNum
(
num
);
//判断该用户是否有打印标签的权限
if
(
tagOperateWhiteListDao
.
isExisted
(
dto
.
getUserId
()))
{
selfPageInfoVo
.
setTagOperateAble
(
true
);
}
return
Result
.
success
(
selfPageInfoVo
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询用户个人主页失败 error : {}"
,
e
);
...
...
@@ -251,6 +255,10 @@ public class SelfPageServiceImpl implements SelfPageService {
}
}
selfPageInfoVo
.
setUserOfferNum
(
num
);
//判断该用户是否有打印标签的权限
if
(
tagOperateWhiteListDao
.
isExisted
(
dto
.
getUserId
()))
{
selfPageInfoVo
.
setTagOperateAble
(
true
);
}
return
Result
.
success
(
selfPageInfoVo
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"查询藏家个人主页失败 error : {}"
,
e
);
...
...
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