Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lingxi-lxy-yanshou
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
后端-黄柯铭
lingxi-lxy-yanshou
Commits
b1bea796
Commit
b1bea796
authored
Aug 06, 2021
by
liao_ds
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/v2' into v2
parents
54469d60
58bd47ff
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
428 additions
and
163 deletions
+428
-163
OrderDeliverySummaryVO.java
...order/model/vo/basic/response/OrderDeliverySummaryVO.java
+159
-0
BaseOrderProductServiceImpl.java
...i/order/serviceimpl/base/BaseOrderProductServiceImpl.java
+10
-0
BaseOrderServiceImpl.java
...y/lingxi/order/serviceimpl/base/BaseOrderServiceImpl.java
+9
-9
settings.gradle
pay-service/settings.gradle
+0
-1
CommonCommodityPlatformRequest.java
...del/request/commodity/CommonCommodityPlatformRequest.java
+7
-2
CommodityCommonController.java
.../lingxi/product/controller/CommodityCommonController.java
+6
-2
CommodityFeignController.java
...y/lingxi/product/controller/CommodityFeignController.java
+31
-5
ICommodityService.java
...ava/com/ssy/lingxi/product/service/ICommodityService.java
+6
-2
CommodityServiceImpl.java
.../ssy/lingxi/product/serviceImpl/CommodityServiceImpl.java
+3
-20
InviteTenderController.java
...xi/purchase/controller/tender/InviteTenderController.java
+18
-18
InviteTenderServiceImpl.java
.../purchase/serviceimpl/tender/InviteTenderServiceImpl.java
+43
-46
CommodityServiceImpl.java
...m/ssy/lingxi/search/serviceImpl/CommodityServiceImpl.java
+3
-2
settings.gradle
system-service/settings.gradle
+2
-2
RuleConfigurationController.java
...lingxi/system/controller/RuleConfigurationController.java
+20
-22
RuleVO.java
...ain/java/com/ssy/lingxi/system/model/response/RuleVO.java
+63
-0
RuleConfigurationService.java
...m/ssy/lingxi/system/service/RuleConfigurationService.java
+13
-12
RuleConfigurationServiceImpl.java
...gxi/system/service/impl/RuleConfigurationServiceImpl.java
+35
-20
No files found.
order-service/src/main/java/com/ssy/lingxi/order/model/vo/basic/response/OrderDeliverySummaryVO.java
View file @
b1bea796
...
...
@@ -11,6 +11,35 @@ import java.io.Serializable;
public
class
OrderDeliverySummaryVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2553399203735300353L
;
public
OrderDeliverySummaryVO
()
{
this
.
productId
=
0L
;
this
.
skuId
=
0L
;
this
.
productNo
=
""
;
this
.
name
=
""
;
this
.
category
=
""
;
this
.
brand
=
""
;
this
.
unit
=
""
;
this
.
spec
=
""
;
this
.
quotedId
=
0L
;
this
.
quotedProductId
=
0L
;
this
.
quotedSkuId
=
0L
;
this
.
quotedProductNo
=
""
;
this
.
quotedName
=
""
;
this
.
quotedSpec
=
""
;
this
.
quotedCategory
=
""
;
this
.
quotedBrand
=
""
;
this
.
price
=
""
;
this
.
discount
=
""
;
this
.
quantity
=
""
;
this
.
tax
=
false
;
this
.
taxRate
=
""
;
this
.
amount
=
""
;
this
.
delivered
=
""
;
this
.
received
=
""
;
this
.
leftCount
=
""
;
this
.
differCount
=
""
;
}
/**
* 商品Id
*/
...
...
@@ -22,6 +51,11 @@ public class OrderDeliverySummaryVO implements Serializable {
private
Long
skuId
;
/**
* 物料编号
*/
private
String
productNo
;
/**
* 商品名称
*/
private
String
name
;
...
...
@@ -42,6 +76,51 @@ public class OrderDeliverySummaryVO implements Serializable {
private
String
unit
;
/**
* 商品规格
*/
private
String
spec
;
/**
* 关联报价单Id
*/
private
Long
quotedId
;
/**
* 关联报价商品Id
*/
private
Long
quotedProductId
;
/**
* 关联报价商品的SkuId
*/
private
Long
quotedSkuId
;
/**
* 关联报价商品的编号
*/
private
String
quotedProductNo
;
/**
* 关联报价商品名称
*/
private
String
quotedName
;
/**
* 关联报价商品规格
*/
private
String
quotedSpec
;
/**
* 关联报价商品品类
*/
private
String
quotedCategory
;
/**
* 关联报价商品品牌
*/
private
String
quotedBrand
;
/**
* 单价,保留到小数点后两位
*/
private
String
price
;
...
...
@@ -107,6 +186,14 @@ public class OrderDeliverySummaryVO implements Serializable {
this
.
skuId
=
skuId
;
}
public
String
getProductNo
()
{
return
productNo
;
}
public
void
setProductNo
(
String
productNo
)
{
this
.
productNo
=
productNo
;
}
public
String
getName
()
{
return
name
;
}
...
...
@@ -139,6 +226,78 @@ public class OrderDeliverySummaryVO implements Serializable {
this
.
unit
=
unit
;
}
public
String
getSpec
()
{
return
spec
;
}
public
void
setSpec
(
String
spec
)
{
this
.
spec
=
spec
;
}
public
Long
getQuotedId
()
{
return
quotedId
;
}
public
void
setQuotedId
(
Long
quotedId
)
{
this
.
quotedId
=
quotedId
;
}
public
Long
getQuotedProductId
()
{
return
quotedProductId
;
}
public
void
setQuotedProductId
(
Long
quotedProductId
)
{
this
.
quotedProductId
=
quotedProductId
;
}
public
Long
getQuotedSkuId
()
{
return
quotedSkuId
;
}
public
void
setQuotedSkuId
(
Long
quotedSkuId
)
{
this
.
quotedSkuId
=
quotedSkuId
;
}
public
String
getQuotedProductNo
()
{
return
quotedProductNo
;
}
public
void
setQuotedProductNo
(
String
quotedProductNo
)
{
this
.
quotedProductNo
=
quotedProductNo
;
}
public
String
getQuotedName
()
{
return
quotedName
;
}
public
void
setQuotedName
(
String
quotedName
)
{
this
.
quotedName
=
quotedName
;
}
public
String
getQuotedSpec
()
{
return
quotedSpec
;
}
public
void
setQuotedSpec
(
String
quotedSpec
)
{
this
.
quotedSpec
=
quotedSpec
;
}
public
String
getQuotedCategory
()
{
return
quotedCategory
;
}
public
void
setQuotedCategory
(
String
quotedCategory
)
{
this
.
quotedCategory
=
quotedCategory
;
}
public
String
getQuotedBrand
()
{
return
quotedBrand
;
}
public
void
setQuotedBrand
(
String
quotedBrand
)
{
this
.
quotedBrand
=
quotedBrand
;
}
public
String
getPrice
()
{
return
price
;
}
...
...
order-service/src/main/java/com/ssy/lingxi/order/serviceimpl/base/BaseOrderProductServiceImpl.java
View file @
b1bea796
...
...
@@ -320,15 +320,25 @@ public class BaseOrderProductServiceImpl implements IBaseOrderProductService {
OrderDeliverySummaryVO
detailVO
=
new
OrderDeliverySummaryVO
();
detailVO
.
setProductId
(
product
.
getProductId
());
detailVO
.
setSkuId
(
product
.
getSkuId
());
detailVO
.
setProductNo
(
product
.
getProductNo
());
detailVO
.
setName
(
StringUtils
.
hasLength
(
product
.
getSpec
())
?
product
.
getName
().
concat
(
"/"
).
concat
(
product
.
getSpec
())
:
product
.
getName
());
detailVO
.
setCategory
(
product
.
getCategory
());
detailVO
.
setBrand
(
product
.
getBrand
());
detailVO
.
setUnit
(
product
.
getUnit
());
detailVO
.
setSpec
(
product
.
getSpec
());
detailVO
.
setPrice
(
NumberUtil
.
formatAmount
(
product
.
getPrice
()));
detailVO
.
setDiscount
(
NumberUtil
.
formatRoundHalfUp
(
product
.
getDiscount
()));
detailVO
.
setQuantity
(
NumberUtil
.
formatToInteger
(
product
.
getQuantity
()));
detailVO
.
setTax
(
product
.
getTax
());
detailVO
.
setTaxRate
(
NumberUtil
.
formatRoundHalfUp
(
product
.
getTaxRate
()));
detailVO
.
setQuotedId
(
product
.
getMaterial
()
==
null
?
0L
:
product
.
getMaterial
().
getQuotedId
());
detailVO
.
setQuotedProductId
(
product
.
getMaterial
()
==
null
?
0L
:
product
.
getMaterial
().
getProductId
());
detailVO
.
setQuotedSkuId
(
product
.
getMaterial
()
==
null
?
0L
:
product
.
getMaterial
().
getSkuId
());
detailVO
.
setQuotedProductNo
(
product
.
getMaterial
()
==
null
?
""
:
product
.
getMaterial
().
getProductNo
());
detailVO
.
setQuotedName
(
product
.
getMaterial
()
==
null
?
""
:
(
StringUtils
.
hasLength
(
product
.
getMaterial
().
getSpec
())
?
product
.
getMaterial
().
getName
().
concat
(
"/"
).
concat
(
product
.
getMaterial
().
getSpec
())
:
product
.
getMaterial
().
getName
()));
detailVO
.
setQuotedCategory
(
product
.
getMaterial
()
==
null
?
""
:
product
.
getMaterial
().
getCategory
());
detailVO
.
setQuotedBrand
(
product
.
getMaterial
()
==
null
?
""
:
product
.
getMaterial
().
getBrand
());
detailVO
.
setQuotedSpec
(
product
.
getMaterial
()
==
null
?
""
:
product
.
getMaterial
().
getSpec
());
detailVO
.
setAmount
(
NumberUtil
.
formatAmount
(
product
.
getAmount
()));
detailVO
.
setDelivered
(
NumberUtil
.
formatToInteger
(
product
.
getDelivered
()));
detailVO
.
setReceived
(
NumberUtil
.
formatToInteger
(
product
.
getReceived
()));
...
...
order-service/src/main/java/com/ssy/lingxi/order/serviceimpl/base/BaseOrderServiceImpl.java
View file @
b1bea796
...
...
@@ -10,10 +10,7 @@ import com.ssy.lingxi.order.entity.OrderProductDO;
import
com.ssy.lingxi.order.model.bo.OrderProductSummaryBO
;
import
com.ssy.lingxi.order.model.bo.ProcessStepsBO
;
import
com.ssy.lingxi.order.model.bo.ProcessTaskBO
;
import
com.ssy.lingxi.order.model.constant.BuyerInnerStatusEnum
;
import
com.ssy.lingxi.order.model.constant.OrderOuterStatusEnum
;
import
com.ssy.lingxi.order.model.constant.OrderServiceContants
;
import
com.ssy.lingxi.order.model.constant.VendorInnerStatusEnum
;
import
com.ssy.lingxi.order.model.constant.*
;
import
com.ssy.lingxi.order.model.vo.basic.response.DropdownItem
;
import
com.ssy.lingxi.order.model.vo.basic.response.WorkFlowStepVO
;
import
com.ssy.lingxi.order.model.vo.buyer.response.BuyerOrderDetailVO
;
...
...
@@ -746,13 +743,16 @@ public class BaseOrderServiceImpl implements IBaseOrderService {
return
;
}
//记录商品交易记录
baseOrderHistoryService
.
saveOrderProductHistory
(
order
);
//通知会员服务,计算会员权益积分
memberFeignService
.
calculateMemberLrc
(
order
.
getBuyerMemberId
(),
order
.
getBuyerRoleId
(),
order
.
getVendorMemberId
(),
order
.
getVendorRoleId
(),
order
.
getTotalAmount
(),
order
.
getOrderNo
());
//通知商品搜索服务,更新商品成交数量
searchFeignService
.
updateProductSoldCount
(
order
.
getShopId
(),
order
.
getShopType
(),
order
.
getProducts
().
stream
().
collect
(
Collectors
.
toMap
(
OrderProductDO:
:
getSkuId
,
OrderProductDO:
:
getQuantity
)));
//Srm订单不需要交易记录、不需要更新成交数量
if
(!
order
.
getOrderKind
().
equals
(
OrderSourceKindEnum
.
SRM
.
getCode
()))
{
//记录商品交易记录
baseOrderHistoryService
.
saveOrderProductHistory
(
order
);
//通知商品搜索服务,更新商品成交数量
searchFeignService
.
updateProductSoldCount
(
order
.
getShopId
(),
order
.
getShopType
(),
order
.
getProducts
().
stream
().
collect
(
Collectors
.
toMap
(
OrderProductDO:
:
getSkuId
,
OrderProductDO:
:
getQuantity
)));
}
}
}
pay-service/settings.gradle
View file @
b1bea796
rootProject
.
name
=
'warehouse-service'
rootProject
.
name
=
'pay-service'
include
'common'
project
(
':common'
).
projectDir
=
"../common"
as
File
...
...
product-service/product-service-api/src/main/java/com/ssy/lingxi/product/api/model/request/commodity/CommonCommodityPlatformRequest.java
View file @
b1bea796
package
com
.
ssy
.
lingxi
.
product
.
api
.
model
.
request
.
commodity
;
import
com.ssy.lingxi.common.model.vo.PageVO
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.util.List
;
/**
*
供应商(卖方)
*
平台
* @author jw.chen
* @version 2.0.0
* @date 2020/6/28
*/
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
CommonCommodityPlatformRequest
{
public
class
CommonCommodityPlatformRequest
extends
PageVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
653183034031191946L
;
/**
* 排除的id集合
...
...
product-service/src/main/java/com/ssy/lingxi/product/controller/CommodityCommonController.java
View file @
b1bea796
...
...
@@ -15,6 +15,7 @@ import com.ssy.lingxi.product.api.model.response.commodity.CommonCommodityPlatfo
import
com.ssy.lingxi.product.service.IChannelCommodityService
;
import
com.ssy.lingxi.product.service.ICommodityService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -111,12 +112,11 @@ public class CommodityCommonController extends BaseController {
/**
* 查询商品列表--平台(全部商品)
* @param pageVO 分页实体
* @param commodityPlatformRequest 查询条件实体
* @return
*/
@RequestMapping
(
value
=
"/getCommodityListByPlatform"
,
method
=
RequestMethod
.
POST
)
public
Wrapper
<
PageData
<
CommonCommodityPlatformResponse
>>
getCommodityListByPlatform
(
PageVO
pageVO
,
CommonCommodityPlatformRequest
commodityPlatformRequest
)
{
public
Wrapper
<
PageData
<
CommonCommodityPlatformResponse
>>
getCommodityListByPlatform
(
@RequestBody
CommonCommodityPlatformRequest
commodityPlatformRequest
)
{
CommodityDetailRequest
commodityDetailRequest
=
this
.
modelMapper
.
map
(
commodityPlatformRequest
,
CommodityDetailRequest
.
class
);
//商品状态
List
<
Integer
>
statusList
=
new
ArrayList
<>();
...
...
@@ -129,6 +129,10 @@ public class CommodityCommonController extends BaseController {
shopIdList
.
add
(
shopId
);
commodityDetailRequest
.
setShopIdList
(
shopIdList
);
}
//分页参数
PageVO
pageVO
=
new
PageVO
();
pageVO
.
setCurrent
(
commodityPlatformRequest
.
getCurrent
());
pageVO
.
setPageSize
(
commodityPlatformRequest
.
getPageSize
());
return
Wrapper
.
success
(
commodityService
.
getCommodityListByPlatform
(
pageVO
,
commodityDetailRequest
));
}
...
...
product-service/src/main/java/com/ssy/lingxi/product/controller/CommodityFeignController.java
View file @
b1bea796
...
...
@@ -2,9 +2,12 @@ package com.ssy.lingxi.product.controller;
import
cn.hutool.core.bean.BeanUtil
;
import
com.ssy.lingxi.common.constant.CommodityStatusEnum
;
import
com.ssy.lingxi.common.constant.Constants
;
import
com.ssy.lingxi.common.controller.BaseController
;
import
com.ssy.lingxi.common.exception.BusinessException
;
import
com.ssy.lingxi.common.model.vo.PageVO
;
import
com.ssy.lingxi.common.response.PageData
;
import
com.ssy.lingxi.common.response.ResponseCode
;
import
com.ssy.lingxi.common.response.Wrapper
;
import
com.ssy.lingxi.product.api.model.request.MemberRequest
;
import
com.ssy.lingxi.product.api.model.request.SimpleIdListRequest
;
...
...
@@ -23,21 +26,20 @@ import com.ssy.lingxi.product.api.model.response.store.StoreResponse;
import
com.ssy.lingxi.product.entity.Brand
;
import
com.ssy.lingxi.product.entity.channelCommodity.ChannelCommodity
;
import
com.ssy.lingxi.product.entity.commodity.Commodity
;
import
com.ssy.lingxi.product.entity.commodity.CommodityGoodsAttribute
;
import
com.ssy.lingxi.product.entity.commodity.CommodityUnitPriceAndPic
;
import
com.ssy.lingxi.product.entity.customer.CustomerCategory
;
import
com.ssy.lingxi.product.service.IBrandService
;
import
com.ssy.lingxi.product.service.IChannelCommodityService
;
import
com.ssy.lingxi.product.service.ICommodityService
;
import
com.ssy.lingxi.product.service.customer.ICustomerCategoryService
;
import
org.apache.commons.lang.StringUtils
;
import
org.modelmapper.TypeToken
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -225,7 +227,31 @@ public class CommodityFeignController extends BaseController {
*/
@RequestMapping
(
value
=
"/getCommodityBySkuId"
,
method
=
RequestMethod
.
GET
)
public
CommodityBaseResponse
getCommodityBySkuId
(
@RequestParam
(
"id"
)
Long
id
)
{
return
commodityService
.
getCommodityBySkuId
(
id
);
CommodityUnitPriceAndPic
commodityUnitPriceAndPic
=
commodityService
.
getCommodityBySkuId
(
id
);
if
(
commodityUnitPriceAndPic
!=
null
){
Commodity
commodity
=
commodityUnitPriceAndPic
.
getCommodity
();
CommodityBaseResponse
commodityBaseResponse
=
new
CommodityBaseResponse
();
commodityBaseResponse
.
setId
(
commodity
.
getId
());
commodityBaseResponse
.
setBrand
(
commodity
.
getBrand
()
==
null
?
""
:
commodity
.
getBrand
().
getName
());
commodityBaseResponse
.
setCode
(
commodity
.
getCode
());
commodityBaseResponse
.
setName
(
commodity
.
getName
());
//查询品类全称
CustomerCategory
customerCategory
=
commodity
.
getCustomerCategory
();
if
(
customerCategory
!=
null
){
commodityBaseResponse
.
setCustomerCategory
(
customerCategoryService
.
getFullNameByFullId
(
customerCategory
.
getFullId
()));
}
//商品属性
List
<
CommodityGoodsAttribute
>
attributeAndValueList
=
commodityUnitPriceAndPic
.
getAttributeAndValueList
();
String
attribute
=
StringUtils
.
join
(
attributeAndValueList
.
stream
().
sorted
(
Comparator
.
comparing
(
CommodityGoodsAttribute:
:
getId
).
reversed
()).
map
(
commodityGoodsAttribute
->
commodityGoodsAttribute
.
getCustomerAttributeValue
().
getValue
()).
toArray
(
String
[]::
new
),
Constants
.
COMMODITY_NAME_SPLIT_STR
);
commodityBaseResponse
.
setCommodityAttribute
(
attribute
);
return
commodityBaseResponse
;
}
else
{
throw
new
BusinessException
(
ResponseCode
.
PRODUCT_COMMODITY_NOT_EXIST
);
}
}
/**
...
...
product-service/src/main/java/com/ssy/lingxi/product/service/ICommodityService.java
View file @
b1bea796
...
...
@@ -4,11 +4,15 @@ import com.ssy.lingxi.common.model.dto.UserLoginCacheDTO;
import
com.ssy.lingxi.common.model.vo.PageVO
;
import
com.ssy.lingxi.common.response.PageData
;
import
com.ssy.lingxi.product.api.model.request.commodity.*
;
import
com.ssy.lingxi.product.api.model.response.commodity.*
;
import
com.ssy.lingxi.product.api.model.response.commodity.CommodityGoodsResponse
;
import
com.ssy.lingxi.product.api.model.response.commodity.CommoditySkuResponse
;
import
com.ssy.lingxi.product.api.model.response.commodity.CommodityStockResponse
;
import
com.ssy.lingxi.product.api.model.response.commodity.CommonCommodityPlatformResponse
;
import
com.ssy.lingxi.product.api.model.response.feign.CommoditySkuStockResponse
;
import
com.ssy.lingxi.product.entity.commodity.Commodity
;
import
com.ssy.lingxi.product.entity.commodity.CommodityAttribute
;
import
com.ssy.lingxi.product.entity.commodity.CommodityCheckRecord
;
import
com.ssy.lingxi.product.entity.commodity.CommodityUnitPriceAndPic
;
import
com.ssy.lingxi.product.entity.commodity.member.CommodityMember
;
import
com.ssy.lingxi.product.entity.commodity.member.CommodityUnitPriceStrategy
;
import
org.springframework.data.domain.Page
;
...
...
@@ -233,7 +237,7 @@ public interface ICommodityService {
* @param id 商品skuid
* @return
*/
Commodity
BaseResponse
getCommodityBySkuId
(
Long
id
);
Commodity
UnitPriceAndPic
getCommodityBySkuId
(
Long
id
);
/**
* 查询商品sku对应的库存
...
...
product-service/src/main/java/com/ssy/lingxi/product/serviceImpl/CommodityServiceImpl.java
View file @
b1bea796
...
...
@@ -705,6 +705,7 @@ public class CommodityServiceImpl implements ICommodityService {
new_status
=
CommodityStatusEnum
.
Off_Shelf
.
getCode
();
}
commodity
.
setStatus
(
new_status
);
commodity
.
setPublishTime
(
System
.
currentTimeMillis
());
commodityRepository
.
saveAndFlush
(
commodity
);
//同步搜索服务
CommodityDetailResponse
commodityDetailResponse
=
new
CommodityDetailResponse
();
...
...
@@ -2033,26 +2034,8 @@ public class CommodityServiceImpl implements ICommodityService {
* @return
*/
@Override
public
CommodityBaseResponse
getCommodityBySkuId
(
Long
id
)
{
CommodityUnitPriceAndPic
commodityUnitPriceAndPic
=
commodityUnitPriceAndPicRepository
.
findById
(
id
).
orElse
(
null
);
if
(
commodityUnitPriceAndPic
!=
null
){
Commodity
commodity
=
commodityUnitPriceAndPic
.
getCommodity
();
CommodityBaseResponse
commodityBaseResponse
=
new
CommodityBaseResponse
();
commodityBaseResponse
.
setId
(
commodity
.
getId
());
commodityBaseResponse
.
setBrand
(
commodity
.
getBrand
()
==
null
?
""
:
commodity
.
getBrand
().
getName
());
commodityBaseResponse
.
setCode
(
commodity
.
getCode
());
commodityBaseResponse
.
setName
(
commodity
.
getName
());
commodityBaseResponse
.
setCustomerCategory
(
commodity
.
getCustomerCategory
().
getName
());
//商品属性
List
<
CommodityGoodsAttribute
>
attributeAndValueList
=
commodityUnitPriceAndPic
.
getAttributeAndValueList
();
String
attribute
=
StringUtils
.
join
(
attributeAndValueList
.
stream
().
sorted
(
Comparator
.
comparing
(
CommodityGoodsAttribute:
:
getId
).
reversed
()).
map
(
commodityGoodsAttribute
->
commodityGoodsAttribute
.
getCustomerAttributeValue
().
getValue
()).
toArray
(
String
[]::
new
),
Constants
.
COMMODITY_NAME_SPLIT_STR
);
commodityBaseResponse
.
setCommodityAttribute
(
attribute
);
return
commodityBaseResponse
;
}
return
null
;
public
CommodityUnitPriceAndPic
getCommodityBySkuId
(
Long
id
)
{
return
commodityUnitPriceAndPicRepository
.
findById
(
id
).
orElse
(
null
);
}
/**
...
...
purchase-service/src/main/java/com/ssy/lingxi/purchase/controller/tender/InviteTenderController.java
View file @
b1bea796
...
...
@@ -33,6 +33,7 @@ import java.text.DecimalFormat;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -153,7 +154,7 @@ public class InviteTenderController extends BaseController {
if
(
finalLoginMemberId
!=
null
){
//判断是否已经报名了
List
<
InviteTenderMember
>
memberList
=
inviteTender
.
getMemberList
();
memberList
.
stream
().
forEach
(
inviteTenderMember
->
{
memberList
.
forEach
(
inviteTenderMember
->
{
//投标会员
Long
submitTenderMemberId
=
inviteTenderMember
.
getMemberId
();
if
(
finalLoginMemberId
.
longValue
()
==
submitTenderMemberId
.
longValue
()){
...
...
@@ -258,7 +259,7 @@ public class InviteTenderController extends BaseController {
if
(
finalLoginMemberId
!=
null
){
//判断是否已经报名了
List
<
InviteTenderMember
>
memberList
=
inviteTender
.
getMemberList
();
memberList
.
stream
().
forEach
(
inviteTenderMember
->
{
memberList
.
forEach
(
inviteTenderMember
->
{
//投标会员
Long
submitTenderMemberId
=
inviteTenderMember
.
getMemberId
();
if
(
finalLoginMemberId
.
longValue
()
==
submitTenderMemberId
.
longValue
()){
...
...
@@ -347,7 +348,7 @@ public class InviteTenderController extends BaseController {
//判断是否已经报名了
List
<
InviteTenderMember
>
memberList
=
inviteTender
.
getMemberList
();
Long
finalLoginMemberId
=
loginMemberId
;
memberList
.
stream
().
forEach
(
inviteTenderMember
->
{
memberList
.
forEach
(
inviteTenderMember
->
{
//投标会员
Long
submitTenderMemberId
=
inviteTenderMember
.
getMemberId
();
if
(
finalLoginMemberId
.
longValue
()
==
submitTenderMemberId
.
longValue
()){
...
...
@@ -906,7 +907,7 @@ public class InviteTenderController extends BaseController {
HashMap
<
Long
,
EvaluationInviteTenderMemberResponse
>
memberEvaluationTenderMap
=
new
HashMap
<>();
List
<
EvaluationInviteTenderMemberResponse
>
evaluationInviteTenderMemberList
=
new
ArrayList
<>();
List
<
InviteTenderMember
>
memberList
=
inviteTender
.
getMemberList
();
memberList
.
stream
().
forEach
(
inviteTenderMember
->
{
memberList
.
forEach
(
inviteTenderMember
->
{
//只查询已经投标的会员
Boolean
isSubmit
=
inviteTenderMember
.
getIsSubmit
();
if
(
isSubmit
!=
null
&&
isSubmit
)
{
...
...
@@ -931,7 +932,7 @@ public class InviteTenderController extends BaseController {
}
else
{
return
null
;
}
}).
filter
(
evaluationTenderOffline
->
evaluationTenderOffline
!=
n
ull
).
collect
(
Collectors
.
toList
());
}).
filter
(
Objects:
:
nonN
ull
).
collect
(
Collectors
.
toList
());
evaluationInviteTenderMember
.
setEvaluationTenderList
(
evaluationTenderList
);
}
evaluationInviteTenderMember
.
setId
(
memberId
);
...
...
@@ -945,11 +946,11 @@ public class InviteTenderController extends BaseController {
//在线评标
if
(
isOnlineEvaluation
){
List
<
ExpertExtract
>
expertExtractList
=
inviteTender
.
getExpertExtractList
();
expertExtractList
.
stream
().
forEach
(
expertExtract
->
{
expertExtractList
.
forEach
(
expertExtract
->
{
List
<
ExpertExtractRecord
>
expertExtractRecordList
=
expertExtract
.
getExpertExtractRecordList
();
expertExtractRecordList
.
stream
().
forEach
(
expertExtractRecord
->
{
expertExtractRecordList
.
forEach
(
expertExtractRecord
->
{
List
<
EvaluationTenderOnline
>
evaluationTenderList
=
expertExtractRecord
.
getEvaluationTenderList
();
evaluationTenderList
.
stream
().
forEach
(
evaluationTender
->
{
evaluationTenderList
.
forEach
(
evaluationTender
->
{
Long
inviteTenderMemberId
=
evaluationTender
.
getInviteTenderMemberId
();
EvaluationInviteTenderMemberResponse
evaluationInviteTenderMember
=
memberEvaluationTenderMap
.
get
(
inviteTenderMemberId
);
if
(
evaluationInviteTenderMember
!=
null
){
...
...
@@ -1210,9 +1211,9 @@ public class InviteTenderController extends BaseController {
List
<
FinishInviteTenderMemberResponse
>
finishInviteTenderMemberResponseList
=
inviteTenderDetailResponse
.
getMemberList
();
List
<
EvaluationInviteTenderMemberResponse
>
evaluationInviteTenderMemberList
=
new
ArrayList
<>();
finishInviteTenderMemberResponseList
.
stream
().
forEach
(
finishInviteTenderMemberResponse
->
{
finishInviteTenderMemberResponseList
.
forEach
(
finishInviteTenderMemberResponse
->
{
Long
finishInviteTenderMemberId
=
finishInviteTenderMemberResponse
.
getId
();
memberList
.
stream
().
forEach
(
inviteTenderMember
->
{
memberList
.
forEach
(
inviteTenderMember
->
{
Long
id
=
inviteTenderMember
.
getId
();
Long
memberId
=
inviteTenderMember
.
getMemberId
();
if
(
finishInviteTenderMemberId
.
longValue
()
==
id
.
longValue
()){
...
...
@@ -1257,12 +1258,12 @@ public class InviteTenderController extends BaseController {
//在线评标
if
(
isOnlineEvaluation
){
List
<
ExpertExtract
>
expertExtractList
=
inviteTender
.
getExpertExtractList
();
expertExtractList
.
stream
().
forEach
(
expertExtract
->
{
expertExtractList
.
forEach
(
expertExtract
->
{
List
<
ExpertExtractRecord
>
expertExtractRecordList
=
expertExtract
.
getExpertExtractRecordList
();
expertExtractRecordList
.
stream
().
forEach
(
expertExtractRecord
->
{
expertExtractRecordList
.
forEach
(
expertExtractRecord
->
{
//投标会员(组装数据给前端)
List
<
EvaluationTenderOnline
>
evaluationTenderList
=
expertExtractRecord
.
getEvaluationTenderList
();
evaluationTenderList
.
stream
().
forEach
(
evaluationTender
->
{
evaluationTenderList
.
forEach
(
evaluationTender
->
{
Long
evaluationTenderId
=
evaluationTender
.
getId
();
Long
inviteTenderMemberId
=
evaluationTender
.
getInviteTenderMemberId
();
String
inviteTenderMemberName
=
evaluationTender
.
getInviteTenderMemberName
();
...
...
@@ -1353,7 +1354,7 @@ public class InviteTenderController extends BaseController {
List
<
WinTenderMemberResponse
>
memberList
=
inviteTenderMemberList
.
stream
().
map
(
inviteTenderMember
->
{
Boolean
isWin
=
inviteTenderMember
.
getIsWin
();
if
(
isWin
!=
null
&&
isWin
){
D
ouble
amount
=
0
d
;
d
ouble
amount
=
0
d
;
WinTenderMemberResponse
winTenderMemberResponse
=
new
WinTenderMemberResponse
();
winTenderMemberResponse
.
setMemberId
(
inviteTenderMember
.
getMemberId
());
winTenderMemberResponse
.
setMemberName
(
inviteTenderMember
.
getMemberName
());
...
...
@@ -1362,11 +1363,10 @@ public class InviteTenderController extends BaseController {
SubmitTender
submitTender
=
inviteTenderMember
.
getSubmitTender
();
List
<
SubmitTenderMateriel
>
submitTenderMaterielList
=
submitTender
.
getSubmitTenderMateriel
();
if
(
submitTenderMaterielList
!=
null
&&
submitTenderMaterielList
.
size
()
>
0
)
{
for
(
int
i
=
0
;
i
<
submitTenderMaterielList
.
size
();
i
++)
{
SubmitTenderMateriel
submitTenderMateriel
=
submitTenderMaterielList
.
get
(
i
);
for
(
SubmitTenderMateriel
submitTenderMateriel
:
submitTenderMaterielList
)
{
//是否授标
Boolean
isAwardTender
=
submitTenderMateriel
.
getIsAwardTender
();
if
(
isAwardTender
!=
null
&&
isAwardTender
)
{
if
(
isAwardTender
!=
null
&&
isAwardTender
)
{
Double
count
=
submitTenderMateriel
.
getInviteTenderMateriel
().
getCount
();
Double
price
=
submitTenderMateriel
.
getPrice
();
Double
awardTenderRatio
=
submitTenderMateriel
.
getAwardTenderRatio
();
...
...
@@ -1379,7 +1379,7 @@ public class InviteTenderController extends BaseController {
}
else
{
return
null
;
}
}).
filter
(
inviteTenderMember
->
inviteTenderMember
!=
n
ull
).
collect
(
Collectors
.
toList
());
}).
filter
(
Objects:
:
nonN
ull
).
collect
(
Collectors
.
toList
());
winTenderNoticeDetailResponse
.
setMemberList
(
memberList
);
return
Wrapper
.
success
(
winTenderNoticeDetailResponse
);
}
...
...
purchase-service/src/main/java/com/ssy/lingxi/purchase/serviceimpl/tender/InviteTenderServiceImpl.java
View file @
b1bea796
...
...
@@ -799,50 +799,50 @@ public class InviteTenderServiceImpl implements IInviteTenderService {
inviteTenderMemberRepository
.
deleteByIdIn
(
memberIdList
);
}
//新增的时候才需要执行
if
(
id
==
null
||
id
<=
0
){
try
{
//启动招投标流程
TaskStartVO
taskStartVO
=
new
TaskStartVO
();
taskStartVO
.
setProcessKey
(
ProcessEnum
.
PURCHASE_INVITE_TENDER
.
getProcessKey
());
taskStartVO
.
setMemberId
(
inviteTender
.
getMemberId
());
taskStartVO
.
setRoleId
(
inviteTender
.
getMemberRoleId
());
taskStartVO
.
setDataId
(
1L
);
Wrapper
<
SimpleTaskCompleteVO
>
simpleTaskCompleteVOWrapper
=
processFeign
.
startSimpleProcess
(
taskStartVO
);
log
.
info
(
"启动招投标流程====="
+
simpleTaskCompleteVOWrapper
);
if
(
ResponseCode
.
SUCCESS
.
getCode
()
==
simpleTaskCompleteVOWrapper
.
getCode
()){
SimpleTaskCompleteVO
data
=
simpleTaskCompleteVOWrapper
.
getData
();
String
taskId
=
data
.
getTaskId
();
Integer
outerStatus
=
data
.
getStatus
();
log
.
info
(
"taskId====="
+
taskId
);
log
.
info
(
"outerStatus====="
+
outerStatus
);
inviteTender
.
setInviteTenderOutStatus
(
outerStatus
);
inviteTender
.
setPurchaseInviteTenderTaskId
(
taskId
);
}
//启动新增招标流程
taskStartVO
=
new
TaskStartVO
();
taskStartVO
.
setProcessKey
(
ProcessEnum
.
PURCHASE_ADD_INVITE_TENDER
.
getProcessKey
());
taskStartVO
.
setMemberId
(
inviteTender
.
getMemberId
());
taskStartVO
.
setRoleId
(
inviteTender
.
getMemberRoleId
());
taskStartVO
.
setDataId
(
1L
);
simpleTaskCompleteVOWrapper
=
processFeign
.
startSimpleProcess
(
taskStartVO
);
log
.
info
(
"启动新增招标流程====="
+
simpleTaskCompleteVOWrapper
);
if
(
ResponseCode
.
SUCCESS
.
getCode
()
==
simpleTaskCompleteVOWrapper
.
getCode
()){
SimpleTaskCompleteVO
data
=
simpleTaskCompleteVOWrapper
.
getData
();
String
taskId
=
data
.
getTaskId
();
Integer
innerStatus
=
data
.
getStatus
();
log
.
info
(
"taskId====="
+
taskId
);
log
.
info
(
"innerStatus====="
+
innerStatus
);
inviteTender
.
setInviteTenderInStatus
(
innerStatus
);
inviteTender
.
setPurchaseAddTenderTaskId
(
taskId
);
}
//数据库持久化对象
inviteTenderRepository
.
saveAndFlush
(
inviteTender
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
BusinessException
(
ResponseCode
.
WF_PROCESS_SERVICE_EXCEPTION
);
try
{
//启动招投标流程
TaskStartVO
taskStartVO
=
new
TaskStartVO
();
taskStartVO
.
setProcessKey
(
ProcessEnum
.
PURCHASE_INVITE_TENDER
.
getProcessKey
());
taskStartVO
.
setMemberId
(
inviteTender
.
getMemberId
());
taskStartVO
.
setRoleId
(
inviteTender
.
getMemberRoleId
());
taskStartVO
.
setDataId
(
1L
);
Wrapper
<
SimpleTaskCompleteVO
>
simpleTaskCompleteVOWrapper
=
processFeign
.
startSimpleProcess
(
taskStartVO
);
log
.
info
(
"启动招投标流程====="
+
simpleTaskCompleteVOWrapper
);
if
(
ResponseCode
.
SUCCESS
.
getCode
()
==
simpleTaskCompleteVOWrapper
.
getCode
()){
SimpleTaskCompleteVO
data
=
simpleTaskCompleteVOWrapper
.
getData
();
String
taskId
=
data
.
getTaskId
();
Integer
outerStatus
=
data
.
getStatus
();
log
.
info
(
"taskId====="
+
taskId
);
log
.
info
(
"outerStatus====="
+
outerStatus
);
inviteTender
.
setInviteTenderOutStatus
(
outerStatus
);
inviteTender
.
setPurchaseInviteTenderTaskId
(
taskId
);
}
//启动新增招标流程
taskStartVO
=
new
TaskStartVO
();
taskStartVO
.
setProcessKey
(
ProcessEnum
.
PURCHASE_ADD_INVITE_TENDER
.
getProcessKey
());
taskStartVO
.
setMemberId
(
inviteTender
.
getMemberId
());
taskStartVO
.
setRoleId
(
inviteTender
.
getMemberRoleId
());
taskStartVO
.
setDataId
(
1L
);
simpleTaskCompleteVOWrapper
=
processFeign
.
startSimpleProcess
(
taskStartVO
);
log
.
info
(
"启动新增招标流程====="
+
simpleTaskCompleteVOWrapper
);
if
(
ResponseCode
.
SUCCESS
.
getCode
()
==
simpleTaskCompleteVOWrapper
.
getCode
()){
SimpleTaskCompleteVO
data
=
simpleTaskCompleteVOWrapper
.
getData
();
String
taskId
=
data
.
getTaskId
();
Integer
innerStatus
=
data
.
getStatus
();
log
.
info
(
"taskId====="
+
taskId
);
log
.
info
(
"innerStatus====="
+
innerStatus
);
inviteTender
.
setInviteTenderInStatus
(
innerStatus
);
inviteTender
.
setPurchaseAddTenderTaskId
(
taskId
);
}
//数据库持久化对象
inviteTenderRepository
.
saveAndFlush
(
inviteTender
);
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
BusinessException
(
ResponseCode
.
WF_PROCESS_SERVICE_EXCEPTION
);
}
//新增的时候才需要执行
if
(
id
==
null
||
id
<=
0
){
//记录内部状态流转
InviteTenderInCheckRecord
inviteTenderInCheckRecord
=
new
InviteTenderInCheckRecord
();
inviteTenderInCheckRecord
.
setStatusValue
(
InviteTenderInStatusEnum
.
getMessage
(
InviteTenderInStatusEnum
.
Not_Submitted_Check_Invite_Tender
.
getCode
()));
...
...
@@ -885,9 +885,6 @@ public class InviteTenderServiceImpl implements IInviteTenderService {
}
catch
(
Exception
e
){
e
.
printStackTrace
();
}
}
else
{
//数据库持久化对象
inviteTenderRepository
.
saveAndFlush
(
inviteTender
);
}
return
inviteTender
.
getId
();
...
...
@@ -2988,7 +2985,7 @@ public class InviteTenderServiceImpl implements IInviteTenderService {
SubmitTender
submitTender
=
inviteTenderMember
.
getSubmitTender
();
List
<
SubmitTenderMateriel
>
submitTenderMaterielList
=
submitTender
.
getSubmitTenderMateriel
();
//中标金额
D
ouble
winnerAmount
=
0
d
;
d
ouble
winnerAmount
=
0
d
;
if
(
submitTenderMaterielList
!=
null
&&
submitTenderMaterielList
.
size
()
>
0
){
for
(
SubmitTenderMateriel
submitTenderMateriel
:
submitTenderMaterielList
)
{
Double
count
=
submitTenderMateriel
.
getInviteTenderMateriel
().
getCount
();
...
...
search-service/src/main/java/com/ssy/lingxi/search/serviceImpl/CommodityServiceImpl.java
View file @
b1bea796
...
...
@@ -112,9 +112,10 @@ public class CommodityServiceImpl implements ICommodityService {
//查询条件
QueryBuilder
query
=
this
.
getBoolQueryBuilder
(
searchRequest
,
type
);
//
排序条件
//
默认按上架时间倒序
Sort
sort
=
Sort
.
by
(
"publishTime"
).
descending
();
SortBuilder
sortBuilder
=
SortBuilders
.
scoreSort
().
order
(
SortOrder
.
DESC
);
SortBuilder
sortBuilder
=
SortBuilders
.
fieldSort
(
"publishTime"
).
order
(
SortOrder
.
DESC
);
Integer
orderType
=
searchRequest
.
getOrderType
();
//企业商城
if
(
ShopTypeEnum
.
ENTERPRISE
.
getCode
().
equals
(
type
)
||
ShopTypeEnum
.
SCORE
.
getCode
().
equals
(
type
)){
...
...
system-service/settings.gradle
View file @
b1bea796
...
...
@@ -14,8 +14,8 @@ project(':pay-service:pay-service-api').projectDir = "../pay-service/pay-service
include
'order-service:order-service-api'
project
(
':order-service:order-service-api'
).
projectDir
=
"../order-service/order-service-api"
as
File
include
'warehouse-service:warehouse-service-api'
project
(
':warehouse-service:warehouse-service-api'
).
projectDir
=
"../warehouse-service/warehouse-service-api"
as
File
//
include 'warehouse-service:warehouse-service-api'
//
project(':warehouse-service:warehouse-service-api').projectDir = "../warehouse-service/warehouse-service-api" as File
include
'sms-service:sms-service-api'
project
(
':sms-service:sms-service-api'
).
projectDir
=
"../sms-service/sms-service-api"
as
File
...
...
system-service/src/main/java/com/ssy/lingxi/system/controller/RuleConfigurationController.java
View file @
b1bea796
...
...
@@ -3,17 +3,17 @@ package com.ssy.lingxi.system.controller;
import
com.ssy.lingxi.common.response.Wrapper
;
import
com.ssy.lingxi.system.dto.request.RuleConfigurationRequest
;
import
com.ssy.lingxi.system.dto.response.RuleConfigurationListResponse
;
import
com.ssy.lingxi.system.
entity.RuleConfiguration
;
import
com.ssy.lingxi.system.
model.response.RuleVO
;
import
com.ssy.lingxi.system.service.RuleConfigurationService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
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.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @menu 规则配置-平台规则配置
* @author wrc
...
...
@@ -22,36 +22,34 @@ import java.util.List;
@Api
(
tags
=
"规则配置平台规则配置"
)
@RestController
public
class
RuleConfigurationController
{
@Resource
RuleConfigurationService
ruleConfigurationService
;
@ApiOperation
(
value
=
" 规则配置平台规则配置列表查询"
)
@GetMapping
(
"/rule/configuration/list"
)
/**
* 查询平台规则配置
* @return 查询结果
*/
@RequestMapping
(
value
=
"/rule/configuration/list"
,
method
=
RequestMethod
.
GET
)
public
Wrapper
<
List
<
RuleConfigurationListResponse
>>
ruleConfigurationList
(
)
{
return
ruleConfigurationService
.
ruleConfigurationList
();
}
@ApiOperation
(
value
=
" 规则配置平台规则配置修改"
)
@PostMapping
(
"/rule/configuration/update"
)
public
Wrapper
ruleConfigurationUpdate
(
@RequestBody
RuleConfigurationRequest
request
){
/**
* 修改平台规则配置状态
* @param request 接口参数
* @return 修改结果
*/
@RequestMapping
(
value
=
"/rule/configuration/update"
,
method
=
RequestMethod
.
POST
)
public
Wrapper
<
Void
>
ruleConfigurationUpdate
(
@RequestBody
RuleConfigurationRequest
request
){
return
ruleConfigurationService
.
ruleConfigurationUpdate
(
request
);
}
/**
*售后订单类型查询
* 查询订单类型
* @return 查询结果
*/
@
GetMapping
(
"/rule/getOrderType"
)
public
Wrapper
<
List
<
Rule
Configuration
>>
getOrderType
()
{
@
RequestMapping
(
value
=
"/rule/getOrderType"
,
method
=
RequestMethod
.
GET
)
public
Wrapper
<
List
<
Rule
VO
>>
getOrderType
()
{
return
ruleConfigurationService
.
getOrderType
();
}
}
system-service/src/main/java/com/ssy/lingxi/system/model/response/RuleVO.java
0 → 100644
View file @
b1bea796
package
com
.
ssy
.
lingxi
.
system
.
model
.
response
;
import
java.io.Serializable
;
/**
* 获取平台规则配置返回
* @author 万宁
* @version 2.0.0
* @date 2021-08-05
*/
public
class
RuleVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
9084675120961709951L
;
private
Integer
id
;
private
Integer
platformType
;
private
String
platformWayName
;
private
Integer
isPitchOn
;
private
String
platformTypeName
;
public
Integer
getId
()
{
return
id
;
}
public
void
setId
(
Integer
id
)
{
this
.
id
=
id
;
}
public
Integer
getPlatformType
()
{
return
platformType
;
}
public
void
setPlatformType
(
Integer
platformType
)
{
this
.
platformType
=
platformType
;
}
public
String
getPlatformWayName
()
{
return
platformWayName
;
}
public
void
setPlatformWayName
(
String
platformWayName
)
{
this
.
platformWayName
=
platformWayName
;
}
public
Integer
getIsPitchOn
()
{
return
isPitchOn
;
}
public
void
setIsPitchOn
(
Integer
isPitchOn
)
{
this
.
isPitchOn
=
isPitchOn
;
}
public
String
getPlatformTypeName
()
{
return
platformTypeName
;
}
public
void
setPlatformTypeName
(
String
platformTypeName
)
{
this
.
platformTypeName
=
platformTypeName
;
}
}
system-service/src/main/java/com/ssy/lingxi/system/service/RuleConfigurationService.java
View file @
b1bea796
...
...
@@ -3,7 +3,7 @@ package com.ssy.lingxi.system.service;
import
com.ssy.lingxi.common.response.Wrapper
;
import
com.ssy.lingxi.system.dto.request.RuleConfigurationRequest
;
import
com.ssy.lingxi.system.dto.response.RuleConfigurationListResponse
;
import
com.ssy.lingxi.system.
entity.RuleConfiguration
;
import
com.ssy.lingxi.system.
model.response.RuleVO
;
import
java.util.List
;
...
...
@@ -14,24 +14,25 @@ import java.util.List;
*/
public
interface
RuleConfigurationService
{
/**
* 查询支付方式配置
* @author wrc
* @date 2020/6/11
*/
Wrapper
<
List
<
RuleConfigurationListResponse
>>
ruleConfigurationList
();
/**
* 修改
支付方式
* @
author wrc
* @
date 2020/7/13
* 修改
平台配置
* @
param request 接口参数
* @
return 修改结果
*/
Wrapper
ruleConfigurationUpdate
(
RuleConfigurationRequest
request
);
Wrapper
<
Void
>
ruleConfigurationUpdate
(
RuleConfigurationRequest
request
);
// /**
// *售后订单类型查询
// */
// Wrapper<List<RuleConfiguration>> getOrderType();
/**
*售后订单类型查询
* 查询订单类型
* @return 查询结果
*/
Wrapper
<
List
<
Rule
Configuration
>>
getOrderType
();
Wrapper
<
List
<
Rule
VO
>>
getOrderType
();
}
system-service/src/main/java/com/ssy/lingxi/system/service/impl/RuleConfigurationServiceImpl.java
View file @
b1bea796
...
...
@@ -12,6 +12,7 @@ import com.ssy.lingxi.system.dao.RuleConfigurationRepository;
import
com.ssy.lingxi.system.dto.request.RuleConfigurationRequest
;
import
com.ssy.lingxi.system.dto.response.RuleConfigurationListResponse
;
import
com.ssy.lingxi.system.entity.RuleConfiguration
;
import
com.ssy.lingxi.system.model.response.RuleVO
;
import
com.ssy.lingxi.system.service.RuleConfigurationService
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.stereotype.Service
;
...
...
@@ -41,9 +42,7 @@ public class RuleConfigurationServiceImpl implements RuleConfigurationService {
/**
* 查询平台规则配置
*
* @author wrc
* @date 2020/6/11
* @return 查询结果
*/
@Override
public
Wrapper
<
List
<
RuleConfigurationListResponse
>>
ruleConfigurationList
()
{
...
...
@@ -61,14 +60,13 @@ public class RuleConfigurationServiceImpl implements RuleConfigurationService {
}
/**
* 修改平台规则配置
* @param request
* @author wrc
* @date 2020/7/13
* 修改平台配置
* @param request 接口参数
* @return 修改结果
*/
@Transactional
@Override
public
Wrapper
ruleConfigurationUpdate
(
RuleConfigurationRequest
request
)
{
public
Wrapper
<
Void
>
ruleConfigurationUpdate
(
RuleConfigurationRequest
request
)
{
List
<
com
.
ssy
.
lingxi
.
platform
.
manage
.
api
.
vo
.
response
.
RuleConfigurationResponse
>
ruleConfigurations
=
new
ArrayList
<>();
request
.
getRuleConfigurations
().
forEach
(
ruleConfiguration
->
{
com
.
ssy
.
lingxi
.
platform
.
manage
.
api
.
vo
.
response
.
RuleConfigurationResponse
ruleConfigurationNew
=
new
RuleConfigurationResponse
();
...
...
@@ -108,17 +106,34 @@ public class RuleConfigurationServiceImpl implements RuleConfigurationService {
* 售后订单类型查询
*/
@Override
public
Wrapper
<
List
<
RuleConfiguration
>>
getOrderType
()
{
List
<
RuleConfiguration
>
allByPlatformType
=
ruleConfigurationRepository
.
findAllByPlatformTypeAndIsPitchOn
(
CommonConstant
.
Type
.
ORDER_TYPE
,
CommonConstant
.
State
.
STATE_START
,
Sort
.
by
(
"code"
).
descending
());
List
<
RuleConfiguration
>
collect
=
allByPlatformType
.
stream
().
map
(
temp
->
{
RuleConfiguration
ruleConfiguration
=
new
RuleConfiguration
();
ruleConfiguration
.
setIsPitchOn
(
temp
.
getIsPitchOn
());
ruleConfiguration
.
setPlatformType
(
temp
.
getPlatformType
());
ruleConfiguration
.
setPlatformTypeName
(
temp
.
getPlatformTypeName
());
ruleConfiguration
.
setPlatformWayName
(
temp
.
getPlatformWayName
());
ruleConfiguration
.
setId
(
Long
.
valueOf
(
temp
.
getCode
()));
return
ruleConfiguration
;
}).
collect
(
Collectors
.
toList
());
return
Wrapper
.
success
(
collect
);
public
Wrapper
<
List
<
RuleVO
>>
getOrderType
()
{
List
<
RuleConfiguration
>
ruleConfigurations
=
ruleConfigurationRepository
.
findAllByPlatformTypeAndIsPitchOn
(
CommonConstant
.
Type
.
ORDER_TYPE
,
CommonConstant
.
State
.
STATE_START
,
Sort
.
by
(
"code"
).
descending
());
return
Wrapper
.
success
(
ruleConfigurations
.
stream
().
map
(
temp
->
{
RuleVO
ruleVO
=
new
RuleVO
();
ruleVO
.
setIsPitchOn
(
temp
.
getIsPitchOn
());
ruleVO
.
setPlatformType
(
temp
.
getPlatformType
());
ruleVO
.
setPlatformTypeName
(
temp
.
getPlatformTypeName
());
ruleVO
.
setPlatformWayName
(
temp
.
getPlatformWayName
());
ruleVO
.
setId
(
temp
.
getCode
());
return
ruleVO
;
}).
collect
(
Collectors
.
toList
()));
}
// /**
// * 售后订单类型查询
// */
// @Override
// public Wrapper<List<RuleConfiguration>> getOrderType() {
// List<RuleConfiguration> allByPlatformType = ruleConfigurationRepository.findAllByPlatformTypeAndIsPitchOn(CommonConstant.Type.ORDER_TYPE,CommonConstant.State.STATE_START,Sort.by("code").descending());
// List<RuleConfiguration> collect = allByPlatformType.stream().map(temp -> {
// RuleConfiguration ruleConfiguration = new RuleConfiguration();
// ruleConfiguration.setIsPitchOn(temp.getIsPitchOn());
// ruleConfiguration.setPlatformType(temp.getPlatformType());
// ruleConfiguration.setPlatformTypeName(temp.getPlatformTypeName());
// ruleConfiguration.setPlatformWayName(temp.getPlatformWayName());
// ruleConfiguration.setId(Long.valueOf(temp.getCode()));
// return ruleConfiguration;
// }).collect(Collectors.toList());
// return Wrapper.success(collect);
// }
}
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