Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fileServe
Overview
Overview
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
vanke
fileServe
Commits
cc3cd66a
Commit
cc3cd66a
authored
Jun 10, 2020
by
XiaHou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权星相关接口
parent
9517d9ca
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
290 additions
and
121 deletions
+290
-121
PmsProductController.java
.../java/com/macro/mall/controller/PmsProductController.java
+15
-14
PmsSupplierAuditController.java
.../mall/controller/quanxing/PmsSupplierAuditController.java
+11
-2
PmsProductSkuValue.java
...rc/main/java/com/macro/mall/model/PmsProductSkuValue.java
+15
-0
PmsProductSkuValueExample.java
.../java/com/macro/mall/model/PmsProductSkuValueExample.java
+60
-0
PmsProductSkuValueMapper.xml
...ources/com/macro/mall/mapper/PmsProductSkuValueMapper.xml
+23
-6
PmsSkuStockDao.java
.../main/java/com/macro/mall/dao/product/PmsSkuStockDao.java
+14
-0
PmsProductSkuValueDao.java
...va/com/macro/mall/dao/quanxing/PmsProductSkuValueDao.java
+15
-1
PmsProductService.java
...ava/com/macro/mall/service/product/PmsProductService.java
+4
-5
PmsProductServiceImpl.java
...acro/mall/service/product/impl/PmsProductServiceImpl.java
+66
-90
IPmsSupplierAuditService.java
...macro/mall/service/quanxing/IPmsSupplierAuditService.java
+7
-0
PmsSupplierAuditServiceImpl.java
...ll/service/quanxing/impl/PmsSupplierAuditServiceImpl.java
+16
-2
PmsSkuStockDao.xml
...n/resources/com/macro/mall/dao/product/PmsSkuStockDao.xml
+21
-0
PmsProductSkuValueDao.xml
...ces/com/macro/mall/dao/quanxing/PmsProductSkuValueDao.xml
+23
-1
No files found.
mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java
View file @
cc3cd66a
...
...
@@ -33,7 +33,7 @@ public class PmsProductController {
private
PmsProductService
productService
;
@ApiOperation
(
"权星创建商品"
)
@ApiOperation
(
"权星
后台_
创建商品"
)
@RequestMapping
(
value
=
"/addProduct"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
addProduct
(
@RequestBody
PmsProductRequestParam
pmsProductRequestParam
){
...
...
@@ -45,26 +45,27 @@ public class PmsProductController {
}
@ApiOperation
(
"
根据商品id获取商品编辑信息
"
)
@RequestMapping
(
value
=
"/
updateInfo/{id}
"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
"
权星后台_获取商品信息根据商品id
"
)
@RequestMapping
(
value
=
"/
getProductInfo
"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:product:read')")
public
CommonResult
<
PmsProductResult
>
getUpdateInfo
(
@PathVariable
Long
id
)
{
PmsProductRe
sult
productResult
=
productService
.
getUpdateInfo
(
id
);
return
CommonResult
.
success
(
p
roductResult
);
public
CommonResult
getUpdateInfo
(
@ApiParam
(
"商品Id"
)
@RequestParam
(
value
=
"id"
)
Long
id
)
{
PmsProductRe
questParam
pmsProductRequestParam
=
productService
.
getProductById
(
id
);
return
CommonResult
.
success
(
p
msProductRequestParam
);
}
@ApiOperation
(
"更新商品"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
"权星后台_修改商品后保存操作 如果sku有变动则需传入pmsProductSkuValueList以及pmsSkuStockList 没有变动则不需传"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:product:update')")
public
CommonResult
update
(
@PathVariable
Long
id
,
@RequestBody
PmsProductParam
productParam
,
BindingResult
bindingResult
)
{
int
count
=
productService
.
update
(
id
,
productParam
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
public
CommonResult
update
(
@RequestBody
PmsProductRequestParam
pmsProductRequestParam
)
{
ResultMsg
res
=
productService
.
updateProduct
(
pmsProductRequestParam
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"查询商品"
)
...
...
mall-admin/src/main/java/com/macro/mall/controller/quanxing/PmsSupplierAuditController.java
View file @
cc3cd66a
...
...
@@ -19,7 +19,7 @@ public class PmsSupplierAuditController {
@Autowired
private
IPmsSupplierAuditService
pmsSupplierAuditService
;
@ApiOperation
(
"权星申请供应商"
)
@ApiOperation
(
"权星
后台_审核
申请供应商"
)
@ResponseBody
@RequestMapping
(
value
=
"/auditSupplier"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
auditSupplier
(
@ApiParam
(
"审核id"
)
@RequestParam
(
"id"
)
Long
id
,
...
...
@@ -31,11 +31,20 @@ public class PmsSupplierAuditController {
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星申请供应商分页数据"
)
@ApiOperation
(
"权星
后台_
申请供应商分页数据"
)
@ResponseBody
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
getPageList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"page"
)
Integer
page
,
@ApiParam
(
"每页大小"
)
@RequestParam
(
"size"
)
Integer
size
,
@ApiParam
(
"(非必传)审核状态 0待审核 1审核通过 2审核不通过"
)
@RequestParam
(
"status"
)
Integer
status
){
return
CommonResult
.
success
(
this
.
pmsSupplierAuditService
.
getPageList
(
page
,
size
,
status
));
}
@ApiOperation
(
"权星后台_通过审核Id得到 相关数据"
)
@ResponseBody
@RequestMapping
(
value
=
"/getSupplierAuditById"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
getSupplierAuditById
(
@ApiParam
(
"审核id"
)
@RequestParam
(
"id"
)
Long
id
){
return
CommonResult
.
success
(
this
.
pmsSupplierAuditService
.
getSupplierAuditById
(
id
));
}
}
mall-mbg/src/main/java/com/macro/mall/model/PmsProductSkuValue.java
View file @
cc3cd66a
...
...
@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
org.springframework.format.annotation.DateTimeFormat
;
@Entity
public
class
PmsProductSkuValue
implements
Serializable
{
...
...
@@ -18,13 +19,18 @@ public class PmsProductSkuValue implements Serializable {
@ApiModelProperty
(
value
=
"规格值"
)
private
String
value
;
@ApiModelProperty
(
value
=
"规格值id"
)
private
Long
attributeGroupId
;
@ApiModelProperty
(
value
=
"创建时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createDate
;
@ApiModelProperty
(
value
=
"创建人"
)
private
Long
createBy
;
@ApiModelProperty
(
value
=
"更新时间"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateDate
;
@ApiModelProperty
(
value
=
"更新者"
)
...
...
@@ -67,6 +73,14 @@ public class PmsProductSkuValue implements Serializable {
this
.
value
=
value
;
}
public
Long
getAttributeGroupId
()
{
return
attributeGroupId
;
}
public
void
setAttributeGroupId
(
Long
attributeGroupId
)
{
this
.
attributeGroupId
=
attributeGroupId
;
}
public
Date
getCreateDate
()
{
return
createDate
;
}
...
...
@@ -117,6 +131,7 @@ public class PmsProductSkuValue implements Serializable {
sb
.
append
(
", productId="
).
append
(
productId
);
sb
.
append
(
", productAttributeId="
).
append
(
productAttributeId
);
sb
.
append
(
", value="
).
append
(
value
);
sb
.
append
(
", attributeGroupId="
).
append
(
attributeGroupId
);
sb
.
append
(
", createDate="
).
append
(
createDate
);
sb
.
append
(
", createBy="
).
append
(
createBy
);
sb
.
append
(
", updateDate="
).
append
(
updateDate
);
...
...
mall-mbg/src/main/java/com/macro/mall/model/PmsProductSkuValueExample.java
View file @
cc3cd66a
...
...
@@ -355,6 +355,66 @@ public class PmsProductSkuValueExample {
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdIsNull
()
{
addCriterion
(
"attribute_group_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdIsNotNull
()
{
addCriterion
(
"attribute_group_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdEqualTo
(
Long
value
)
{
addCriterion
(
"attribute_group_id ="
,
value
,
"attributeGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"attribute_group_id <>"
,
value
,
"attributeGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdGreaterThan
(
Long
value
)
{
addCriterion
(
"attribute_group_id >"
,
value
,
"attributeGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"attribute_group_id >="
,
value
,
"attributeGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdLessThan
(
Long
value
)
{
addCriterion
(
"attribute_group_id <"
,
value
,
"attributeGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"attribute_group_id <="
,
value
,
"attributeGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"attribute_group_id in"
,
values
,
"attributeGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"attribute_group_id not in"
,
values
,
"attributeGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"attribute_group_id between"
,
value1
,
value2
,
"attributeGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAttributeGroupIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"attribute_group_id not between"
,
value1
,
value2
,
"attributeGroupId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCreateDateIsNull
()
{
addCriterion
(
"create_date is null"
);
return
(
Criteria
)
this
;
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductSkuValueMapper.xml
View file @
cc3cd66a
...
...
@@ -6,6 +6,7 @@
<result
column=
"product_id"
jdbcType=
"BIGINT"
property=
"productId"
/>
<result
column=
"product_attribute_id"
jdbcType=
"BIGINT"
property=
"productAttributeId"
/>
<result
column=
"value"
jdbcType=
"VARCHAR"
property=
"value"
/>
<result
column=
"attribute_group_id"
jdbcType=
"BIGINT"
property=
"attributeGroupId"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"create_by"
jdbcType=
"BIGINT"
property=
"createBy"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
...
...
@@ -71,8 +72,8 @@
</where>
</sql>
<sql
id=
"Base_Column_List"
>
id, product_id, product_attribute_id, value,
create_date, create_by, update_date
,
update_by, delete_status
id, product_id, product_attribute_id, value,
attribute_group_id, create_date, create_by
,
update_
date, update_
by, delete_status
</sql>
<select
id=
"selectByExample"
parameterType=
"com.macro.mall.model.PmsProductSkuValueExample"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -109,11 +110,13 @@
SELECT LAST_INSERT_ID()
</selectKey>
insert into pms_product_sku_value (product_id, product_attribute_id, value,
create_date, create_by, update_date,
update_by, delete_status)
attribute_group_id, create_date, create_by,
update_date, update_by, delete_status
)
values (#{productId,jdbcType=BIGINT}, #{productAttributeId,jdbcType=BIGINT}, #{value,jdbcType=VARCHAR},
#{createDate,jdbcType=TIMESTAMP}, #{createBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP},
#{updateBy,jdbcType=BIGINT}, #{deleteStatus,jdbcType=INTEGER})
#{attributeGroupId,jdbcType=BIGINT}, #{createDate,jdbcType=TIMESTAMP}, #{createBy,jdbcType=BIGINT},
#{updateDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=BIGINT}, #{deleteStatus,jdbcType=INTEGER}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.PmsProductSkuValue"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
...
@@ -130,6 +133,9 @@
<if
test=
"value != null"
>
value,
</if>
<if
test=
"attributeGroupId != null"
>
attribute_group_id,
</if>
<if
test=
"createDate != null"
>
create_date,
</if>
...
...
@@ -156,6 +162,9 @@
<if
test=
"value != null"
>
#{value,jdbcType=VARCHAR},
</if>
<if
test=
"attributeGroupId != null"
>
#{attributeGroupId,jdbcType=BIGINT},
</if>
<if
test=
"createDate != null"
>
#{createDate,jdbcType=TIMESTAMP},
</if>
...
...
@@ -194,6 +203,9 @@
<if
test=
"record.value != null"
>
value = #{record.value,jdbcType=VARCHAR},
</if>
<if
test=
"record.attributeGroupId != null"
>
attribute_group_id = #{record.attributeGroupId,jdbcType=BIGINT},
</if>
<if
test=
"record.createDate != null"
>
create_date = #{record.createDate,jdbcType=TIMESTAMP},
</if>
...
...
@@ -220,6 +232,7 @@
product_id = #{record.productId,jdbcType=BIGINT},
product_attribute_id = #{record.productAttributeId,jdbcType=BIGINT},
value = #{record.value,jdbcType=VARCHAR},
attribute_group_id = #{record.attributeGroupId,jdbcType=BIGINT},
create_date = #{record.createDate,jdbcType=TIMESTAMP},
create_by = #{record.createBy,jdbcType=BIGINT},
update_date = #{record.updateDate,jdbcType=TIMESTAMP},
...
...
@@ -241,6 +254,9 @@
<if
test=
"value != null"
>
value = #{value,jdbcType=VARCHAR},
</if>
<if
test=
"attributeGroupId != null"
>
attribute_group_id = #{attributeGroupId,jdbcType=BIGINT},
</if>
<if
test=
"createDate != null"
>
create_date = #{createDate,jdbcType=TIMESTAMP},
</if>
...
...
@@ -264,6 +280,7 @@
set product_id = #{productId,jdbcType=BIGINT},
product_attribute_id = #{productAttributeId,jdbcType=BIGINT},
value = #{value,jdbcType=VARCHAR},
attribute_group_id = #{attributeGroupId,jdbcType=BIGINT},
create_date = #{createDate,jdbcType=TIMESTAMP},
create_by = #{createBy,jdbcType=BIGINT},
update_date = #{updateDate,jdbcType=TIMESTAMP},
...
...
mall-service/src/main/java/com/macro/mall/dao/product/PmsSkuStockDao.java
View file @
cc3cd66a
...
...
@@ -26,4 +26,18 @@ public interface PmsSkuStockDao {
* @return
*/
Long
getProductTotalStock
(
@Param
(
"productId"
)
Long
productId
);
/**
* 根据id查询 skuList数据
* @param productId
* @return
*/
List
<
PmsSkuStock
>
selectListByProductId
(
Long
productId
);
/**
* 根据商品id 改变删除状态
* @param pmsSkuStock
* @return
*/
int
updateDeleteStatusByProductId
(
PmsSkuStock
pmsSkuStock
);
}
mall-
admin/src/main/java/com/macro/mall/dao
/PmsProductSkuValueDao.java
→
mall-
service/src/main/java/com/macro/mall/dao/quanxing
/PmsProductSkuValueDao.java
View file @
cc3cd66a
package
com
.
macro
.
mall
.
dao
;
package
com
.
macro
.
mall
.
dao
.
quanxing
;
import
com.macro.mall.model.PmsProductSkuValue
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -13,4 +13,18 @@ import java.util.List;
public
interface
PmsProductSkuValueDao
{
@Transactional
int
insertList
(
@Param
(
"list"
)
List
<
PmsProductSkuValue
>
productSkuValueList
);
/**
* 根据商品id 返回商品规格值List
* @param productId
* @return
*/
List
<
PmsProductSkuValue
>
selectListByProductId
(
Long
productId
);
/**
* 根据商品id 修改删除状态
* @param pmsProductSkuValue
* @return
*/
int
updateDeleteStatusByProductId
(
PmsProductSkuValue
pmsProductSkuValue
);
}
mall-service/src/main/java/com/macro/mall/service/product/PmsProductService.java
View file @
cc3cd66a
...
...
@@ -23,7 +23,7 @@ import java.util.List;
public
interface
PmsProductService
{
/**
* 商家商品列表
* 商家商品列表
getUpdateInfo
* @param mchtProductQueryParam
* @return
*/
...
...
@@ -81,15 +81,14 @@ public interface PmsProductService {
List
<
Long
>
getLikeId
(
String
url
);
/**
* 根据商品编号获取
更新
信息
* 根据商品编号获取
商品相关
信息
*/
PmsProductRe
sult
getUpdateInfo
(
Long
id
);
PmsProductRe
questParam
getProductById
(
Long
id
);
/**
* 更新商品
*/
@Transactional
int
update
(
Long
id
,
PmsProductParam
productParam
);
ResultMsg
updateProduct
(
PmsProductRequestParam
pmsProductRequestParam
);
/**
* 分页查询商品
...
...
mall-service/src/main/java/com/macro/mall/service/product/impl/PmsProductServiceImpl.java
View file @
cc3cd66a
This diff is collapsed.
Click to expand it.
mall-service/src/main/java/com/macro/mall/service/quanxing/IPmsSupplierAuditService.java
View file @
cc3cd66a
...
...
@@ -34,4 +34,11 @@ public interface IPmsSupplierAuditService {
* @return
*/
List
<
PmsSupplierAuditDto
>
getPageList
(
Integer
page
,
Integer
size
,
Integer
status
);
/**
* 根据id获取一条审核记录
* @param id
* @return
*/
PmsSupplierAuditDto
getSupplierAuditById
(
Long
id
);
}
mall-service/src/main/java/com/macro/mall/service/quanxing/impl/PmsSupplierAuditServiceImpl.java
View file @
cc3cd66a
...
...
@@ -165,11 +165,12 @@ public class PmsSupplierAuditServiceImpl implements IPmsSupplierAuditService {
public
List
<
PmsSupplierAuditDto
>
getPageList
(
Integer
page
,
Integer
size
,
Integer
status
){
PageHelper
.
startPage
(
page
,
size
);
PmsSupplierAuditExample
example
=
new
PmsSupplierAuditExample
();
PmsSupplierAuditExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
status
!=
null
){
//如果存在查询状态 则传入
example
.
createCriteria
()
.
andStatusEqualTo
(
status
);
criteria
.
andStatusEqualTo
(
status
);
}
//过滤已删除的数据
example
.
createCriteria
()
.
andDeleteStatusEqualTo
(
0
);
//删除标识0 未删除 1已删除
criteria
.
andDeleteStatusEqualTo
(
0
);
//删除标识0 未删除 1已删除
List
<
PmsSupplierAudit
>
dataList
=
this
.
pmsSupplierAuditMapper
.
selectByExample
(
example
);
List
<
PmsSupplierAuditDto
>
psadList
=
new
ArrayList
<>();
dataList
.
forEach
(
pmsSupplierAudit
->{
...
...
@@ -183,4 +184,17 @@ public class PmsSupplierAuditServiceImpl implements IPmsSupplierAuditService {
return
psadList
;
}
/**
* 根据id获取一条审核记录
* @param id
* @return
*/
@Override
public
PmsSupplierAuditDto
getSupplierAuditById
(
Long
id
){
PmsSupplierAuditDto
pmsSupplierAuditDto
=
new
PmsSupplierAuditDto
();
PmsSupplierAudit
psa
=
this
.
pmsSupplierAuditMapper
.
selectByPrimaryKey
(
id
);
BeanUtils
.
copyProperties
(
psa
,
pmsSupplierAuditDto
);
pmsSupplierAuditDto
.
setPmsSupplierAuditProductList
(
this
.
pmsSupplierAuditProductDao
.
selectListByAuditId
(
id
));
return
pmsSupplierAuditDto
;
}
}
mall-service/src/main/resources/com/macro/mall/dao/product/PmsSkuStockDao.xml
View file @
cc3cd66a
<?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.macro.mall.dao.product.PmsSkuStockDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.PmsSkuStock"
extends=
"com.macro.mall.mapper.PmsSkuStockMapper.BaseResultMap"
>
</resultMap>
<insert
id=
"insertList"
>
INSERT INTO pms_sku_stock (product_id, sku_code, price, stock, low_stock, sp1, sp2, sp3, pic, sale,promotion_price,sku_sn,item_ids,lp2,lp3,lp4) VALUES
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
...
...
@@ -52,4 +55,21 @@
and product_id =#{productId}
</where>
</select>
<select
id=
"selectListByProductId"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select * from pms_sku_stock
where product_id=#{productId}
and delete_status = 0
</select>
<update
id=
"updateDeleteStatusByProductId"
parameterType=
"com.macro.mall.model.PmsSkuStock"
>
update pms_sku_stock
<set>
<if
test=
"deleteStatus != null"
>
delete_status = #{deleteStatus},
</if>
</set>
where product_id = #{productId}
</update>
</mapper>
\ No newline at end of file
mall-
admin/src/main/resources/dao
/PmsProductSkuValueDao.xml
→
mall-
service/src/main/resources/com/macro/mall/dao/quanxing
/PmsProductSkuValueDao.xml
View file @
cc3cd66a
<?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.macro.mall.dao.PmsProductSkuValueDao"
>
<mapper
namespace=
"com.macro.mall.dao.quanxing.PmsProductSkuValueDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.PmsProductSkuValue"
extends=
"com.macro.mall.mapper.PmsProductSkuValueMapper.BaseResultMap"
>
</resultMap>
<insert
id=
"insertList"
>
insert into pms_product_sku_value (product_id,product_attribute_id,value,create_date,delete_status) values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
...
...
@@ -10,4 +14,21 @@
now(),0)
</foreach>
</insert>
<select
id=
"selectListByProductId"
parameterType=
"java.lang.Long"
resultMap=
"BaseResultMap"
>
select * from pms_product_sku_value
where product_id=#{productId}
and delete_status = 0
</select>
<update
id=
"updateDeleteStatusByProductId"
parameterType=
"com.macro.mall.model.PmsProductSkuValue"
>
update pms_product_sku_value
<set>
<if
test=
"deleteStatus != null"
>
delete_status = #{deleteStatus},
</if>
</set>
where product_id = #{productId}
</update>
</mapper>
\ No newline at end of file
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