Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
platform
/
platform-shopmall-parent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4f7fd043
authored
Apr 18, 2023
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改商品查询条件
1 parent
c90fa382
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
295 additions
and
225 deletions
platform-shopmall-api/src/main/java/cn/com/glsx/admin/modules/enums/ShelvesStatusEnum.java
platform-shopmall-api/src/main/java/cn/com/glsx/admin/modules/model/BizOrderNotifyMessage.java
platform-shopmall-api/src/main/java/cn/com/glsx/admin/modules/model/cloudcrane/response/GoodsSkuListItem.java
platform-shopmall-api/src/main/java/cn/com/glsx/admin/modules/model/cloudcrane/response/GoodsSkuListSearchItem.java
platform-shopmall/src/main/java/cn/com/glsx/admin/modules/service/GoodsService.java
platform-shopmall/src/main/java/cn/com/glsx/admin/modules/service/OrderChildService.java
platform-shopmall/src/main/resources/mapper/GoodsMapper.xml
platform-shopmall-api/src/main/java/cn/com/glsx/admin/modules/enums/ShelvesStatusEnum.java
0 → 100644
View file @
4f7fd04
package
cn
.
com
.
glsx
.
admin
.
modules
.
enums
;
import
com.glsx.plat.core.enums.BaseEnum
;
import
lombok.AllArgsConstructor
;
import
lombok.Getter
;
@Getter
@AllArgsConstructor
public
enum
ShelvesStatusEnum
implements
BaseEnum
<
ShelvesStatusEnum
,
Integer
>
{
ON_SHELVES
(
1001
,
"上架"
),
OFF_SHELVES
(
1002
,
"下架"
),
;
private
final
Integer
value
;
private
final
String
text
;
@Override
public
String
getDisplayName
()
{
return
text
;
}
}
platform-shopmall-api/src/main/java/cn/com/glsx/admin/modules/model/BizOrderNotifyMessage.java
View file @
4f7fd04
...
...
@@ -61,6 +61,6 @@ public class BizOrderNotifyMessage implements Serializable {
*/
private
String
reason
;
private
Lo
ng
time
;
private
Stri
ng
time
;
}
platform-shopmall-api/src/main/java/cn/com/glsx/admin/modules/model/cloudcrane/response/GoodsSkuListItem.java
View file @
4f7fd04
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
cloudcrane
.
response
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
@Data
public
class
GoodsSkuListItem
{
@Schema
(
description
=
"商品spu编码"
)
private
String
goodsCode
;
@Schema
(
description
=
"商品Sku名称"
)
private
String
goodsSkuCode
;
@Schema
(
description
=
"商品Sku编码"
)
private
String
goodsSkuName
;
@Schema
(
description
=
"商品销售价"
)
private
Double
sellPrice
;
@Schema
(
description
=
"商品起购数量"
)
private
Integer
startQty
;
@Schema
(
description
=
"商品上下架状态"
)
private
Integer
shelvesStatus
;
}
platform-shopmall-api/src/main/java/cn/com/glsx/admin/modules/model/cloudcrane/response/GoodsSkuListSearchItem.java
View file @
4f7fd04
package
cn
.
com
.
glsx
.
admin
.
modules
.
model
.
cloudcrane
.
response
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
/**
...
...
@@ -13,9 +14,16 @@ import lombok.Data;
@Data
public
class
GoodsSkuListSearchItem
extends
GoodsSkuListItem
{
@Schema
(
description
=
"商品主图"
)
private
String
imgUrl
;
@Schema
(
description
=
"商品库存状态"
)
private
Integer
stockStatus
;
@Schema
(
description
=
"商品主图"
)
private
Integer
stockNum
;
@Schema
(
description
=
"商品市场价"
)
private
Double
marketPrice
;
}
platform-shopmall/src/main/java/cn/com/glsx/admin/modules/service/GoodsService.java
View file @
4f7fd04
...
...
@@ -2,6 +2,8 @@ package cn.com.glsx.admin.modules.service;
import
cn.com.glsx.admin.modules.converter.GoodsConverter
;
import
cn.com.glsx.admin.modules.entity.*
;
import
cn.com.glsx.admin.modules.enums.ShelvesStatusEnum
;
import
cn.com.glsx.admin.modules.enums.StockStatusEnum
;
import
cn.com.glsx.admin.modules.mapper.*
;
import
cn.com.glsx.admin.modules.model.cloudcrane.request.QueryGoodsListByConditionRequestDTO
;
import
cn.com.glsx.admin.modules.model.cloudcrane.request.QueryGoodsListRequest
;
...
...
@@ -69,6 +71,11 @@ public class GoodsService {
*/
public
PageInfo
<
GoodsSkuListSearchItem
>
queryGoodsListByCondition
(
QueryGoodsListByConditionRequestDTO
req
)
{
Page
<
GoodsSkuListSearchItem
>
pages
=
PageHelper
.
startPage
(
req
.
getPageNum
(),
req
.
getPageSize
());
//展示有库存且是上架状态的商品,过滤无库存和下架商品
req
.
setShelvesStatus
(
ShelvesStatusEnum
.
ON_SHELVES
.
getValue
());
req
.
setStockStatus
(
StockStatusEnum
.
HAVE_STOCK
.
getValue
());
goodsMapper
.
queryGoodsListByCondition
(
req
);
// cloudCraneService.queryGoodsListByCondition(req);
return
new
PageInfo
(
pages
);
...
...
platform-shopmall/src/main/java/cn/com/glsx/admin/modules/service/OrderChildService.java
View file @
4f7fd04
...
...
@@ -18,6 +18,7 @@ import cn.com.glsx.admin.modules.model.cloudcrane.response.OrderChildOrderDetail
import
cn.com.glsx.admin.modules.model.cloudcrane.response.OrderGoodsListItem
;
import
cn.com.glsx.admin.modules.model.cloudcrane.response.QueryOrderDetailResponse
;
import
cn.hutool.json.JSONUtil
;
import
com.glsx.plat.common.utils.DateUtils
;
import
com.glsx.plat.common.utils.SnowFlake
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.kafka.clients.producer.KafkaProducer
;
...
...
@@ -283,6 +284,7 @@ public class OrderChildService implements InitializingBean {
.
tparOrderCode
(
orderChild
.
getParentOrderCode
())
.
parentOrderCode
(
orderChild
.
getTparOrderCode
())
.
orderStatus
(
orderChild
.
getOrderStatus
())
.
time
(
DateUtils
.
currentDateTime
())
.
build
();
if
(
Objects
.
equals
(
OrderStatusEnum
.
WAIT_DELIVERY
.
getValue
(),
orderChild
.
getOrderStatus
()))
{
...
...
@@ -308,6 +310,7 @@ public class OrderChildService implements InitializingBean {
.
expressCode
(
orderLogistic
.
getExpressCode
())
.
expressName
(
orderLogistic
.
getExpressName
())
.
expressNumber
(
orderLogistic
.
getShipmentCode
())
.
time
(
DateUtils
.
currentDateTime
())
.
build
();
return
message
;
}
...
...
@@ -321,6 +324,7 @@ public class OrderChildService implements InitializingBean {
.
tparReturnOrderCode
(
afterSalesOrder
.
getTparReturnOrderCode
())
.
returnOrderCode
(
afterSalesOrder
.
getReturnOrderCode
())
.
returnOrderStatus
(
afterSalesOrder
.
getReturnStatus
())
.
time
(
DateUtils
.
currentDateTime
())
.
build
();
return
message
;
}
...
...
platform-shopmall/src/main/resources/mapper/GoodsMapper.xml
View file @
4f7fd04
<?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=
"cn.com.glsx.admin.modules.mapper.GoodsMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.admin.modules.entity.Goods"
>
<!--
WARNING - @mbg.generated
-->
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"goods_code"
jdbcType=
"VARCHAR"
property=
"goodsCode"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"goods_sku_name"
jdbcType=
"VARCHAR"
property=
"goodsSkuName"
/>
<result
column=
"goods_sku_title"
jdbcType=
"VARCHAR"
property=
"goodsSkuTitle"
/>
<result
column=
"sell_price"
jdbcType=
"DOUBLE"
property=
"sellPrice"
/>
<result
column=
"market_price"
jdbcType=
"DOUBLE"
property=
"marketPrice"
/>
<result
column=
"start_qty"
jdbcType=
"INTEGER"
property=
"startQty"
/>
<result
column=
"shelves_status"
jdbcType=
"INTEGER"
property=
"shelvesStatus"
/>
<result
column=
"tax_code"
jdbcType=
"VARCHAR"
property=
"taxCode"
/>
<result
column=
"tax_rate"
jdbcType=
"REAL"
property=
"taxRate"
/>
<result
column=
"bar_code"
jdbcType=
"VARCHAR"
property=
"barCode"
/>
<result
column=
"is_deleted"
jdbcType=
"INTEGER"
property=
"isDeleted"
/>
<result
column=
"brand_code"
jdbcType=
"VARCHAR"
property=
"brandCode"
/>
<result
column=
"brand_name"
jdbcType=
"VARCHAR"
property=
"brandName"
/>
<result
column=
"first_category_code"
jdbcType=
"VARCHAR"
property=
"firstCategoryCode"
/>
<result
column=
"first_category_name"
jdbcType=
"VARCHAR"
property=
"firstCategoryName"
/>
<result
column=
"second_category_code"
jdbcType=
"VARCHAR"
property=
"secondCategoryCode"
/>
<result
column=
"second_category_name"
jdbcType=
"VARCHAR"
property=
"secondCategoryName"
/>
<result
column=
"last_category_code"
jdbcType=
"VARCHAR"
property=
"lastCategoryCode"
/>
<result
column=
"last_category_name"
jdbcType=
"VARCHAR"
property=
"lastCategoryName"
/>
<result
column=
"return_goods_rules"
jdbcType=
"INTEGER"
property=
"returnGoodsRules"
/>
<result
column=
"goods_characteristic"
jdbcType=
"VARCHAR"
property=
"goodsCharacteristic"
/>
<result
column=
"goods_unit"
jdbcType=
"VARCHAR"
property=
"goodsUnit"
/>
<result
column=
"model_number"
jdbcType=
"VARCHAR"
property=
"modelNumber"
/>
<result
column=
"product_place"
jdbcType=
"VARCHAR"
property=
"productPlace"
/>
<result
column=
"have_shelf_life"
jdbcType=
"INTEGER"
property=
"haveShelfLife"
/>
<result
column=
"shelf_life"
jdbcType=
"VARCHAR"
property=
"shelfLife"
/>
<result
column=
"fragile_goods"
jdbcType=
"INTEGER"
property=
"fragileGoods"
/>
<result
column=
"gross_weight"
jdbcType=
"DOUBLE"
property=
"grossWeight"
/>
<result
column=
"gross_weight_unit"
jdbcType=
"VARCHAR"
property=
"grossWeightUnit"
/>
<result
column=
"density"
jdbcType=
"DOUBLE"
property=
"density"
/>
<result
column=
"extent"
jdbcType=
"INTEGER"
property=
"extent"
/>
<result
column=
"width"
jdbcType=
"INTEGER"
property=
"width"
/>
<result
column=
"height"
jdbcType=
"INTEGER"
property=
"height"
/>
<result
column=
"del_flag"
jdbcType=
"TINYINT"
property=
"delFlag"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"created_by"
jdbcType=
"INTEGER"
property=
"createdBy"
/>
<result
column=
"updated_date"
jdbcType=
"TIMESTAMP"
property=
"updatedDate"
/>
<result
column=
"updated_by"
jdbcType=
"INTEGER"
property=
"updatedBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
-->
id, goods_code, goods_sku_code, goods_sku_name, goods_sku_title, sell_price, market_price,
start_qty, shelves_status, tax_code, tax_rate, bar_code, is_deleted, brand_code,
brand_name, first_category_code, first_category_name, second_category_code, second_category_name,
last_category_code, last_category_name, return_goods_rules, goods_characteristic,
goods_unit, model_number, product_place, have_shelf_life, shelf_life, fragile_goods,
gross_weight, gross_weight_unit, density, extent, width, height, del_flag, created_date,
created_by, updated_date, updated_by
</sql>
<resultMap
id=
"GoodsDetailMap"
extends=
"BaseResultMap"
type=
"cn.com.glsx.admin.modules.entity.Goods"
>
<association
property=
"descDetail"
javaType=
"cn.com.glsx.admin.modules.entity.GoodsDescDetail"
>
<id
column=
"sgdd_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"goods_describe"
jdbcType=
"VARCHAR"
property=
"goodsDescribe"
/>
</association>
<association
property=
"goodsStock"
javaType=
"cn.com.glsx.admin.modules.entity.GoodsStock"
>
<id
column=
"sgsk_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"stock_status"
jdbcType=
"INTEGER"
property=
"stockStatus"
/>
<result
column=
"stock_num"
jdbcType=
"INTEGER"
property=
"stockNum"
/>
</association>
<association
property=
"goodsLimit"
javaType=
"cn.com.glsx.admin.modules.entity.GoodsSaleLimit"
>
<id
column=
"sgsl_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"sale_limit_type"
jdbcType=
"INTEGER"
property=
"saleLimitType"
/>
<result
column=
"province_ids"
jdbcType=
"VARCHAR"
property=
"provinceIds"
/>
<result
column=
"city_ids"
jdbcType=
"VARCHAR"
property=
"cityIds"
/>
<result
column=
"area_ids"
jdbcType=
"VARCHAR"
property=
"areaIds"
/>
</association>
<collection
property=
"specList"
ofType=
"cn.com.glsx.admin.modules.entity.GoodsSpecification"
>
<id
column=
"sgs_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"spec_name"
jdbcType=
"VARCHAR"
property=
"specName"
/>
<result
column=
"spec_value"
jdbcType=
"VARCHAR"
property=
"specValue"
/>
</collection>
<collection
property=
"attributeList"
ofType=
"cn.com.glsx.admin.modules.entity.GoodsAttribute"
>
<id
column=
"sga_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"attribute_code"
jdbcType=
"VARCHAR"
property=
"attributeCode"
/>
<result
column=
"attribute_name"
jdbcType=
"VARCHAR"
property=
"attributeName"
/>
<result
column=
"attribute_value_code"
jdbcType=
"VARCHAR"
property=
"attributeValueCode"
/>
<result
column=
"attribute_value_name"
jdbcType=
"VARCHAR"
property=
"attributeValueName"
/>
</collection>
<collection
property=
"goodsImageList"
ofType=
"cn.com.glsx.admin.modules.entity.GoodsImage"
>
<id
column=
"sgi_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"img_url"
jdbcType=
"VARCHAR"
property=
"imgUrl"
/>
<result
column=
"img_main"
jdbcType=
"INTEGER"
property=
"imgMain"
/>
<result
column=
"img_sort"
jdbcType=
"INTEGER"
property=
"imgSort"
/>
</collection>
</resultMap>
<resultMap
id=
"BaseResultMap"
type=
"cn.com.glsx.admin.modules.entity.Goods"
>
<!--
WARNING - @mbg.generated
-->
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"goods_code"
jdbcType=
"VARCHAR"
property=
"goodsCode"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"goods_sku_name"
jdbcType=
"VARCHAR"
property=
"goodsSkuName"
/>
<result
column=
"goods_sku_title"
jdbcType=
"VARCHAR"
property=
"goodsSkuTitle"
/>
<result
column=
"sell_price"
jdbcType=
"DOUBLE"
property=
"sellPrice"
/>
<result
column=
"market_price"
jdbcType=
"DOUBLE"
property=
"marketPrice"
/>
<result
column=
"start_qty"
jdbcType=
"INTEGER"
property=
"startQty"
/>
<result
column=
"shelves_status"
jdbcType=
"INTEGER"
property=
"shelvesStatus"
/>
<result
column=
"tax_code"
jdbcType=
"VARCHAR"
property=
"taxCode"
/>
<result
column=
"tax_rate"
jdbcType=
"REAL"
property=
"taxRate"
/>
<result
column=
"bar_code"
jdbcType=
"VARCHAR"
property=
"barCode"
/>
<result
column=
"is_deleted"
jdbcType=
"INTEGER"
property=
"isDeleted"
/>
<result
column=
"brand_code"
jdbcType=
"VARCHAR"
property=
"brandCode"
/>
<result
column=
"brand_name"
jdbcType=
"VARCHAR"
property=
"brandName"
/>
<result
column=
"first_category_code"
jdbcType=
"VARCHAR"
property=
"firstCategoryCode"
/>
<result
column=
"first_category_name"
jdbcType=
"VARCHAR"
property=
"firstCategoryName"
/>
<result
column=
"second_category_code"
jdbcType=
"VARCHAR"
property=
"secondCategoryCode"
/>
<result
column=
"second_category_name"
jdbcType=
"VARCHAR"
property=
"secondCategoryName"
/>
<result
column=
"last_category_code"
jdbcType=
"VARCHAR"
property=
"lastCategoryCode"
/>
<result
column=
"last_category_name"
jdbcType=
"VARCHAR"
property=
"lastCategoryName"
/>
<result
column=
"return_goods_rules"
jdbcType=
"INTEGER"
property=
"returnGoodsRules"
/>
<result
column=
"goods_characteristic"
jdbcType=
"VARCHAR"
property=
"goodsCharacteristic"
/>
<result
column=
"goods_unit"
jdbcType=
"VARCHAR"
property=
"goodsUnit"
/>
<result
column=
"model_number"
jdbcType=
"VARCHAR"
property=
"modelNumber"
/>
<result
column=
"product_place"
jdbcType=
"VARCHAR"
property=
"productPlace"
/>
<result
column=
"have_shelf_life"
jdbcType=
"INTEGER"
property=
"haveShelfLife"
/>
<result
column=
"shelf_life"
jdbcType=
"VARCHAR"
property=
"shelfLife"
/>
<result
column=
"fragile_goods"
jdbcType=
"INTEGER"
property=
"fragileGoods"
/>
<result
column=
"gross_weight"
jdbcType=
"DOUBLE"
property=
"grossWeight"
/>
<result
column=
"gross_weight_unit"
jdbcType=
"VARCHAR"
property=
"grossWeightUnit"
/>
<result
column=
"density"
jdbcType=
"DOUBLE"
property=
"density"
/>
<result
column=
"extent"
jdbcType=
"INTEGER"
property=
"extent"
/>
<result
column=
"width"
jdbcType=
"INTEGER"
property=
"width"
/>
<result
column=
"height"
jdbcType=
"INTEGER"
property=
"height"
/>
<result
column=
"del_flag"
jdbcType=
"TINYINT"
property=
"delFlag"
/>
<result
column=
"created_date"
jdbcType=
"TIMESTAMP"
property=
"createdDate"
/>
<result
column=
"created_by"
jdbcType=
"INTEGER"
property=
"createdBy"
/>
<result
column=
"updated_date"
jdbcType=
"TIMESTAMP"
property=
"updatedDate"
/>
<result
column=
"updated_by"
jdbcType=
"INTEGER"
property=
"updatedBy"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--
WARNING - @mbg.generated
-->
id, goods_code, goods_sku_code, goods_sku_name, goods_sku_title, sell_price, market_price,
start_qty, shelves_status, tax_code, tax_rate, bar_code, is_deleted, brand_code,
brand_name, first_category_code, first_category_name, second_category_code, second_category_name,
last_category_code, last_category_name, return_goods_rules, goods_characteristic,
goods_unit, model_number, product_place, have_shelf_life, shelf_life, fragile_goods,
gross_weight, gross_weight_unit, density, extent, width, height, del_flag, created_date,
created_by, updated_date, updated_by
</sql>
<resultMap
id=
"GoodsDetailMap"
extends=
"BaseResultMap"
type=
"cn.com.glsx.admin.modules.entity.Goods"
>
<association
property=
"descDetail"
javaType=
"cn.com.glsx.admin.modules.entity.GoodsDescDetail"
>
<id
column=
"sgdd_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"goods_describe"
jdbcType=
"VARCHAR"
property=
"goodsDescribe"
/>
</association>
<association
property=
"goodsStock"
javaType=
"cn.com.glsx.admin.modules.entity.GoodsStock"
>
<id
column=
"sgsk_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"stock_status"
jdbcType=
"INTEGER"
property=
"stockStatus"
/>
<result
column=
"stock_num"
jdbcType=
"INTEGER"
property=
"stockNum"
/>
</association>
<association
property=
"goodsLimit"
javaType=
"cn.com.glsx.admin.modules.entity.GoodsSaleLimit"
>
<id
column=
"sgsl_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"sale_limit_type"
jdbcType=
"INTEGER"
property=
"saleLimitType"
/>
<result
column=
"province_ids"
jdbcType=
"VARCHAR"
property=
"provinceIds"
/>
<result
column=
"city_ids"
jdbcType=
"VARCHAR"
property=
"cityIds"
/>
<result
column=
"area_ids"
jdbcType=
"VARCHAR"
property=
"areaIds"
/>
</association>
<collection
property=
"specList"
ofType=
"cn.com.glsx.admin.modules.entity.GoodsSpecification"
>
<id
column=
"sgs_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"spec_name"
jdbcType=
"VARCHAR"
property=
"specName"
/>
<result
column=
"spec_value"
jdbcType=
"VARCHAR"
property=
"specValue"
/>
</collection>
<collection
property=
"attributeList"
ofType=
"cn.com.glsx.admin.modules.entity.GoodsAttribute"
>
<id
column=
"sga_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"attribute_code"
jdbcType=
"VARCHAR"
property=
"attributeCode"
/>
<result
column=
"attribute_name"
jdbcType=
"VARCHAR"
property=
"attributeName"
/>
<result
column=
"attribute_value_code"
jdbcType=
"VARCHAR"
property=
"attributeValueCode"
/>
<result
column=
"attribute_value_name"
jdbcType=
"VARCHAR"
property=
"attributeValueName"
/>
</collection>
<collection
property=
"goodsImageList"
ofType=
"cn.com.glsx.admin.modules.entity.GoodsImage"
>
<id
column=
"sgi_id"
javaType=
"LONG"
property=
"id"
/>
<result
column=
"goods_sku_code"
jdbcType=
"VARCHAR"
property=
"goodsSkuCode"
/>
<result
column=
"img_url"
jdbcType=
"VARCHAR"
property=
"imgUrl"
/>
<result
column=
"img_main"
jdbcType=
"INTEGER"
property=
"imgMain"
/>
<result
column=
"img_sort"
jdbcType=
"INTEGER"
property=
"imgSort"
/>
</collection>
</resultMap>
<select
id=
"queryGoodsList"
resultType=
"cn.com.glsx.admin.modules.model.cloudcrane.response.GoodsSkuListItem"
>
select sg.goods_code,sg.goods_sku_code,sg.goods_sku_name,sg.sell_price,sg.start_qty,
sg.shelves_status
from shopmall_goods sg
where sg.del_flag = 0
</select>
<select
id=
"queryGoodsList"
resultType=
"cn.com.glsx.admin.modules.model.cloudcrane.response.GoodsSkuListItem"
>
select sg.goods_code, sg.goods_sku_code, sg.goods_sku_name, sg.sell_price, sg.start_qty,
sg.shelves_status
from shopmall_goods sg
where sg.del_flag = 0
</select>
<select
id=
"queryGoodsListByCondition"
resultType=
"cn.com.glsx.admin.modules.model.cloudcrane.response.GoodsSkuListSearchItem"
>
select sg.goods_code,sg.goods_sku_code,sg.goods_sku_name,sgi.img_url,sgs.stock_status,sg.sell_price,sg.market_price,sg.start_qty,sg.shelves_status
from shopmall_goods sg
left join shopmall_goods_image sgi on sg.goods_sku_code = sgi.goods_sku_code and img_main=1
left join shopmall_goods_stock sgs on sg.goods_sku_code = sgs.goods_sku_code
left join shopmall_goods_sale_limit sgsl on sg.goods_sku_code = sgsl.goods_sku_code
where sg.del_flag = 0
<if
test=
"goodsSkuCode != null and goodsSkuCode != ''"
>
and sg.goods_sku_code = #{goodsSkuCode}
</if>
<if
test=
"goodsSkuName != null and goodsSkuName != ''"
>
and sg.goods_sku_name like concat('%',#{goodsSkuName},'%')
</if>
<if
test=
"brandCode != null and brandCode != ''"
>
and sg.brand_code = #{brandCode}
</if>
<if
test=
"categoryCode != null and categoryCode != ''"
>
and sg.last_category_code = #{categoryCode}
</if>
<if
test=
"startSellPrice != null"
>
and sg.sell_price
>
= #{startSellPrice}
</if>
<if
test=
"endSellPrice != null"
>
and sg.sell_price
<
#{endSellPrice}
</if>
<if
test=
"startMarketPrice != null"
>
and sg.market_price
>
= #{startMarketPrice}
</if>
<if
test=
"endMarketPrice != null"
>
and sg.market_price
<
#{endMarketPrice}
</if>
<if
test=
"startDiffPrice != null and endDiffPrice != null"
>
and (sg.market_price-sg.sell_price) between #{startDiffPrice} and #{endDiffPrice}
</if>
<if
test=
"shelvesStatus != null"
>
and sg.shelves_status = #{shelvesStatus}
</if>
<if
test=
"stockStatus != null"
>
and sgs.stock_status = #{stockStatus}
</if>
<if
test=
"provinceId != null"
>
and find_in_set(#{provinceId}, sgsl.province_ids)
</if>
<if
test=
"cityId != null"
>
and find_in_set(#{cityId}, sgsl.city_ids)
</if>
<if
test=
"areaId != null"
>
and find_in_set(#{areaId}, sgsl.area_ids)
</if>
</select>
<select
id=
"queryGoodsListByCondition"
resultType=
"cn.com.glsx.admin.modules.model.cloudcrane.response.GoodsSkuListSearchItem"
>
select
sg.goods_code,sg.goods_sku_code,sg.goods_sku_name,sgi.img_url,sgs.stock_status,sgs.stock_num,sg.sell_price,
sg.market_price,sg.start_qty,sg.shelves_status
from shopmall_goods sg
left join shopmall_goods_image sgi on sg.goods_sku_code = sgi.goods_sku_code and img_main=1
left join shopmall_goods_stock sgs on sg.goods_sku_code = sgs.goods_sku_code
left join shopmall_goods_sale_limit sgsl on sg.goods_sku_code = sgsl.goods_sku_code
where sg.del_flag = 0
<if
test=
"goodsSkuCode != null and goodsSkuCode != ''"
>
and sg.goods_sku_code = #{goodsSkuCode}
</if>
<if
test=
"goodsSkuName != null and goodsSkuName != ''"
>
and sg.goods_sku_name like concat('%',#{goodsSkuName},'%')
</if>
<if
test=
"brandCode != null and brandCode != ''"
>
and sg.brand_code = #{brandCode}
</if>
<if
test=
"categoryCode != null and categoryCode != ''"
>
and sg.last_category_code = #{categoryCode}
</if>
<if
test=
"startSellPrice != null"
>
and sg.sell_price
>
= #{startSellPrice}
</if>
<if
test=
"endSellPrice != null"
>
and sg.sell_price
<
#{endSellPrice}
</if>
<if
test=
"startMarketPrice != null"
>
and sg.market_price
>
= #{startMarketPrice}
</if>
<if
test=
"endMarketPrice != null"
>
and sg.market_price
<
#{endMarketPrice}
</if>
<if
test=
"startDiffPrice != null and endDiffPrice != null"
>
and (sg.market_price-sg.sell_price) between #{startDiffPrice} and #{endDiffPrice}
</if>
<if
test=
"shelvesStatus != null"
>
and sg.shelves_status = #{shelvesStatus}
</if>
<if
test=
"stockStatus != null"
>
and sgs.stock_status = #{stockStatus}
</if>
<if
test=
"provinceId != null"
>
and find_in_set(#{provinceId}, sgsl.province_ids)
</if>
<if
test=
"cityId != null"
>
and find_in_set(#{cityId}, sgsl.city_ids)
</if>
<if
test=
"areaId != null"
>
and find_in_set(#{areaId}, sgsl.area_ids)
</if>
<choose>
<when
test=
"priceOrderType == 1"
>
order by sg.sell_price desc
</when>
<when
test=
"priceOrderType == 2"
>
order by sg.sell_price asc
</when>
<otherwise>
</otherwise>
</choose>
</select>
<select
id=
"queryGoodsDetail"
resultMap=
"GoodsDetailMap"
>
select sg.id,sg.goods_code,sg.goods_sku_code,sg.goods_sku_name,sg.goods_sku_title,sg.sell_price,sg.market_price,
<select
id=
"queryGoodsDetail"
resultMap=
"GoodsDetailMap"
>
select sg.id,sg.goods_code,sg.goods_sku_code,sg.goods_sku_name,sg.goods_sku_title,sg.sell_price,sg.market_price,
sg.start_qty,sg.shelves_status,sg.tax_code,sg.tax_rate,sg.bar_code,sg.is_deleted,sg.brand_code,
sg.brand_name,sg.first_category_code,sg.first_category_name,sg.second_category_code,sg.second_category_name,
sg.last_category_code,sg.last_category_name,sg.return_goods_rules,sg.goods_characteristic,sg.goods_unit,
...
...
@@ -171,77 +185,81 @@
sgi.id sgi_id,sgi.img_url,sgi.img_main,sgi.img_sort,
sgs2.id sgsk_id,sgs2.stock_status,sgs2.stock_num,
sgsl.id sgsl_id,sgsl.sale_limit_type,sgsl.province_ids,sgsl.city_ids,sgsl.area_ids
from shopmall_goods sg
inner join shopmall_goods_desc_detail sgdd on sg.goods_sku_code=sgdd.goods_sku_code
inner join shopmall_goods_stock sgs2 on sg.goods_sku_code=sgs2.goods_sku_code
inner join shopmall_goods_sale_limit sgsl on sg.goods_sku_code=sgsl.goods_sku_code
left join shopmall_goods_specification sgs on sg.goods_sku_code=sgs.goods_sku_code
left join shopmall_goods_attribute sga on sg.goods_sku_code=sga.goods_sku_code
left join shopmall_goods_image sgi on sg.goods_sku_code=sgi.goods_sku_code
where sg.del_flag = 0
and sg.goods_sku_code in
<foreach
collection=
"goodsSkuCodes"
separator=
","
item=
"item"
open=
"("
close=
")"
>
#{item}
</foreach>
</select>
from shopmall_goods sg
inner join shopmall_goods_desc_detail sgdd on sg.goods_sku_code=sgdd.goods_sku_code
inner join shopmall_goods_stock sgs2 on sg.goods_sku_code=sgs2.goods_sku_code
inner join shopmall_goods_sale_limit sgsl on sg.goods_sku_code=sgsl.goods_sku_code
left join shopmall_goods_specification sgs on sg.goods_sku_code=sgs.goods_sku_code
left join shopmall_goods_attribute sga on sg.goods_sku_code=sga.goods_sku_code
left join shopmall_goods_image sgi on sg.goods_sku_code=sgi.goods_sku_code
where sg.del_flag = 0
and sg.goods_sku_code in
<foreach
collection=
"goodsSkuCodes"
separator=
","
item=
"item"
open=
"("
close=
")"
>
#{item}
</foreach>
</select>
<select
id=
"queryGoodsShelvesList"
resultType=
"cn.com.glsx.admin.modules.model.cloudcrane.response.QueryGoodsShelvesListResponse"
>
select sg.goods_sku_code,sg.shelves_status
from shopmall_goods sg
where sg.del_flag = 0
and sg.goods_sku_code in
<foreach
collection=
"goodsSkuCodes"
separator=
","
item=
"item"
open=
"("
close=
")"
>
#{item}
</foreach>
</select>
<select
id=
"queryGoodsShelvesList"
resultType=
"cn.com.glsx.admin.modules.model.cloudcrane.response.QueryGoodsShelvesListResponse"
>
select sg.goods_sku_code,sg.shelves_status
from shopmall_goods sg
where sg.del_flag = 0
and sg.goods_sku_code in
<foreach
collection=
"goodsSkuCodes"
separator=
","
item=
"item"
open=
"("
close=
")"
>
#{item}
</foreach>
</select>
<select
id=
"queryGoodsPriceList"
resultType=
"cn.com.glsx.admin.modules.model.cloudcrane.response.QueryGoodsPriceListResponse"
>
select sg.goods_sku_code,sg.sell_price,sg.market_price
from shopmall_goods sg
where sg.del_flag = 0
and sg.goods_sku_code in
<foreach
collection=
"goodsSkuCodes"
separator=
","
item=
"item"
open=
"("
close=
")"
>
#{item}
</foreach>
</select>
<select
id=
"queryGoodsPriceList"
resultType=
"cn.com.glsx.admin.modules.model.cloudcrane.response.QueryGoodsPriceListResponse"
>
select sg.goods_sku_code,sg.sell_price,sg.market_price
from shopmall_goods sg
where sg.del_flag = 0
and sg.goods_sku_code in
<foreach
collection=
"goodsSkuCodes"
separator=
","
item=
"item"
open=
"("
close=
")"
>
#{item}
</foreach>
</select>
<select
id=
"selectByGoodsSkuCodes"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from shopmall_goods sg
where sg.del_flag = 0
and sg.goods_sku_code in
<foreach
collection=
"goodsSkuCodes"
separator=
","
item=
"item"
open=
"("
close=
")"
>
#{item}
</foreach>
</select>
<select
id=
"selectByGoodsSkuCodes"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from shopmall_goods sg
where sg.del_flag = 0
and sg.goods_sku_code in
<foreach
collection=
"goodsSkuCodes"
separator=
","
item=
"item"
open=
"("
close=
")"
>
#{item}
</foreach>
</select>
<insert
id=
"insertOrUpdate"
>
INSERT INTO shopmall_goods
(goods_code, goods_sku_code, goods_sku_name, goods_sku_title, sell_price, market_price,
start_qty, shelves_status, tax_code, tax_rate, bar_code, is_deleted, brand_code,
brand_name, first_category_code, first_category_name, second_category_code, second_category_name,
last_category_code, last_category_name, return_goods_rules, goods_characteristic,
goods_unit, model_number, product_place, have_shelf_life, shelf_life, fragile_goods,
gross_weight, gross_weight_unit, density, extent, width, height, del_flag, created_date)
VALUES (#{goodsCode}, #{goodsSkuCode}, #{goodsSkuName}, #{goodsSkuTitle}, #{sellPrice}, #{marketPrice},
#{startQty}, #{shelvesStatus}, #{taxCode}, #{taxRate}, #{barCode}, #{isDeleted}, #{brandCode}, #{brandName},
#{firstCategoryCode}, #{firstCategoryName}, #{secondCategoryCode}, #{secondCategoryName},
#{lastCategoryCode}, #{lastCategoryCode},
#{returnGoodsRules}, #{goodsCharacteristic}, #{goodsUnit}, #{modelNumber}, #{productPlace},
#{haveShelfLife}, #{shelfLife}, #{fragileGoods},
#{grossWeight}, #{grossWeightUnit}, #{density}, #{extent}, #{width}, #{height}, 0,
sysdate()) ON DUPLICATE KEY
UPDATE
sell_price=#{sellPrice},
market_price=#{marketPrice},
updated_date=sysdate()
</insert>
<insert
id=
"insertOrUpdate"
>
INSERT INTO shopmall_goods
(goods_code, goods_sku_code, goods_sku_name, goods_sku_title, sell_price, market_price,
start_qty, shelves_status, tax_code, tax_rate, bar_code, is_deleted, brand_code,
brand_name, first_category_code, first_category_name, second_category_code, second_category_name,
last_category_code, last_category_name, return_goods_rules, goods_characteristic,
goods_unit, model_number, product_place, have_shelf_life, shelf_life, fragile_goods,
gross_weight, gross_weight_unit, density, extent, width, height, del_flag, created_date)
VALUES (#{goodsCode}, #{goodsSkuCode}, #{goodsSkuName}, #{goodsSkuTitle}, #{sellPrice}, #{marketPrice},
#{startQty}, #{shelvesStatus}, #{taxCode}, #{taxRate}, #{barCode}, #{isDeleted}, #{brandCode},
#{brandName},
#{firstCategoryCode}, #{firstCategoryName}, #{secondCategoryCode}, #{secondCategoryName},
#{lastCategoryCode}, #{lastCategoryCode},
#{returnGoodsRules}, #{goodsCharacteristic}, #{goodsUnit}, #{modelNumber}, #{productPlace},
#{haveShelfLife}, #{shelfLife}, #{fragileGoods},
#{grossWeight}, #{grossWeightUnit}, #{density}, #{extent}, #{width}, #{height}, 0,
sysdate()) ON DUPLICATE KEY
UPDATE
sell_price=#{sellPrice},
market_price=#{marketPrice},
updated_date=sysdate()
</insert>
<select
id=
"selectByGoodsSkuCode"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from shopmall_goods sg
where sg.del_flag = 0
and sg.goods_sku_code = #{goodsSkuCode}
</select>
<select
id=
"selectByGoodsSkuCode"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from shopmall_goods sg
where sg.del_flag = 0
and sg.goods_sku_code = #{goodsSkuCode}
</select>
</mapper>
\ No newline at end of file
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