Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f686f859
authored
May 18, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-dingwf' into develop
2 parents
5355a61e
6bbbd1d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
62 additions
and
2 deletions
project-order/src/main/java/com/alibaba/cloud/integration/order/dao/OrderTagStrategyDao.java
project-order/src/main/java/com/alibaba/cloud/integration/order/entity/OrderTagStrategyEntity.java
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/ProductServiceImpl.java
project-order/src/main/java/com/alibaba/cloud/integration/order/dao/OrderTagStrategyDao.java
0 → 100644
View file @
f686f85
package
com
.
alibaba
.
cloud
.
integration
.
order
.
dao
;
import
com.alibaba.cloud.integration.order.entity.OrderTagStrategyEntity
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
import
java.util.List
;
public
interface
OrderTagStrategyDao
extends
JpaRepository
<
OrderTagStrategyEntity
,
Long
>
{
@Query
(
"select distinct s.tagName from OrderTagStrategyEntity s where s.disabled=0"
)
List
<
String
>
getAllTags
();
}
project-order/src/main/java/com/alibaba/cloud/integration/order/entity/OrderTagStrategyEntity.java
0 → 100644
View file @
f686f85
package
com
.
alibaba
.
cloud
.
integration
.
order
.
entity
;
import
lombok.Data
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
java.util.Date
;
@Entity
@Data
public
class
OrderTagStrategyEntity
{
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
private
Integer
id
;
private
String
tagName
;
private
String
processWay
;
private
int
attention
;
private
int
priority
;
private
int
disabled
;
private
String
memo
;
private
Date
createTime
;
private
Date
updateTime
;
}
project-order/src/main/java/com/alibaba/cloud/integration/order/service/impl/ProductServiceImpl.java
View file @
f686f85
package
com
.
alibaba
.
cloud
.
integration
.
order
.
service
.
impl
;
import
com.alibaba.cloud.integration.common.Result
;
import
com.alibaba.cloud.integration.order.dao.OrderTagStrategyDao
;
import
com.alibaba.cloud.integration.order.dao.ProductCategoryDao
;
import
com.alibaba.cloud.integration.order.dto.BrandDTO
;
import
com.alibaba.cloud.integration.order.dto.KeyValueDTO
;
...
...
@@ -23,12 +24,33 @@ public class ProductServiceImpl implements ProductService {
@Autowired
private
ProductCategoryDao
productCategoryDao
;
@Autowired
private
OrderTagStrategyDao
orderTagStrategyDao
;
private
List
<
KeyValueDTO
>
getPriorities
()
{
return
null
;
List
<
KeyValueDTO
>
listPriorities
=
new
ArrayList
<>();
int
prioritiesLevels
=
10
;
for
(
int
i
=
0
;
i
<=
prioritiesLevels
;
i
++)
{
String
label
;
if
(
i
==
0
)
{
label
=
"最低"
;
}
else
if
(
i
==
prioritiesLevels
)
{
label
=
"最高"
;
}
else
{
label
=
String
.
format
(
"优先级%d"
,
i
);
}
listPriorities
.
add
(
new
KeyValueDTO
().
setLabel
(
label
).
setValue
(
String
.
valueOf
(
i
)));
}
return
listPriorities
;
}
private
List
<
KeyValueDTO
>
getStandardTags
()
{
return
null
;
List
<
KeyValueDTO
>
tagList
=
new
ArrayList
<>();
for
(
String
tag
:
orderTagStrategyDao
.
getAllTags
())
{
tagList
.
add
(
new
KeyValueDTO
().
setLabel
(
tag
).
setValue
(
tag
));
}
return
tagList
;
}
private
List
<
BrandDTO
>
getBrands
()
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment