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
4d6bd18c
Commit
4d6bd18c
authored
Jun 15, 2020
by
XiaHou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权星相关接口修复
parent
ef7ced5c
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
74 additions
and
116 deletions
+74
-116
PmsProductController.java
.../java/com/macro/mall/controller/PmsProductController.java
+4
-2
PmsProduct.java
mall-mbg/src/main/java/com/macro/mall/model/PmsProduct.java
+1
-13
PmsProductExample.java
...src/main/java/com/macro/mall/model/PmsProductExample.java
+0
-60
PmsProductDto.java
...java/com/macro/mall/model/dto/quanxing/PmsProductDto.java
+14
-0
PmsProductMapper.xml
...main/resources/com/macro/mall/mapper/PmsProductMapper.xml
+7
-24
PmsProductController.java
...mall/portal/controller/quanxing/PmsProductController.java
+5
-1
PmsProductDao.java
...c/main/java/com/macro/mall/dao/product/PmsProductDao.java
+2
-0
PmsProductService.java
...ava/com/macro/mall/service/product/PmsProductService.java
+4
-2
PmsProductServiceImpl.java
...acro/mall/service/product/impl/PmsProductServiceImpl.java
+18
-14
PmsProductDao.xml
...in/resources/com/macro/mall/dao/product/PmsProductDao.xml
+19
-0
No files found.
mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java
View file @
4d6bd18c
...
...
@@ -5,6 +5,7 @@ import com.macro.mall.common.api.CommonResult;
import
com.macro.mall.domain.dto.PmsProductRequestParam
;
import
com.macro.mall.model.PmsProduct
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.quanxing.PmsProductDto
;
import
com.macro.mall.model.dto.quanxing.common.BatchOperationDto
;
import
com.macro.mall.service.product.PmsProductService
;
import
io.swagger.annotations.Api
;
...
...
@@ -65,10 +66,11 @@ public class PmsProductController {
@ApiOperation
(
"权星后台_商品分页查询"
)
@ResponseBody
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
<
CommonPage
<
PmsProduct
>>
getPageList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"page"
)
Integer
page
,
@ApiParam
(
"每页大小"
)
@RequestParam
(
"size"
)
Integer
size
,
public
CommonResult
<
CommonPage
<
PmsProduct
Dto
>>
getPageList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"page"
)
Integer
page
,
@ApiParam
(
"每页大小"
)
@RequestParam
(
"size"
)
Integer
size
,
@ApiParam
(
"模糊查询商品名称 "
)
@RequestParam
(
"name"
)
String
name
,
@ApiParam
(
"模糊查询商品供应商名称 "
)
@RequestParam
(
"mchtName"
)
String
mchtName
,
@ApiParam
(
"审核状态 0待审核 1审核通过 2审核未通过 "
)
@RequestParam
(
"verifyStatus"
)
Integer
verifyStatus
){
return
CommonResult
.
success
(
CommonPage
.
restPage
(
this
.
productService
.
getPageList
(
page
,
size
,
name
,
verifyStatus
)));
return
CommonResult
.
success
(
CommonPage
.
restPage
(
this
.
productService
.
getPageList
(
page
,
size
,
name
,
verifyStatus
,
mchtName
)));
}
@ApiOperation
(
"权星后台_根据商品id修改一条商品数据"
)
...
...
mall-mbg/src/main/java/com/macro/mall/model/PmsProduct.java
View file @
4d6bd18c
...
...
@@ -154,10 +154,7 @@ public class PmsProduct implements Serializable {
@ApiModelProperty
(
value
=
"更新者"
)
private
Long
updateBy
;
@ApiModelProperty
(
value
=
"删除状态0 未删除 1已删除(可以还原)"
)
private
Integer
delFlag
;
@ApiModelProperty
(
value
=
"删除标识0 未删除 1已删除(彻底删除)"
)
@ApiModelProperty
(
value
=
"删除标识0 未删除 1已删除"
)
private
Integer
deleteStatus
;
@ApiModelProperty
(
value
=
"配送方式 1快递 2自提"
)
...
...
@@ -556,14 +553,6 @@ public class PmsProduct implements Serializable {
this
.
updateBy
=
updateBy
;
}
public
Integer
getDelFlag
()
{
return
delFlag
;
}
public
void
setDelFlag
(
Integer
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
public
Integer
getDeleteStatus
()
{
return
deleteStatus
;
}
...
...
@@ -673,7 +662,6 @@ public class PmsProduct implements Serializable {
sb
.
append
(
", createBy="
).
append
(
createBy
);
sb
.
append
(
", updateDate="
).
append
(
updateDate
);
sb
.
append
(
", updateBy="
).
append
(
updateBy
);
sb
.
append
(
", delFlag="
).
append
(
delFlag
);
sb
.
append
(
", deleteStatus="
).
append
(
deleteStatus
);
sb
.
append
(
", deliveryType="
).
append
(
deliveryType
);
sb
.
append
(
", contSign="
).
append
(
contSign
);
...
...
mall-mbg/src/main/java/com/macro/mall/model/PmsProductExample.java
View file @
4d6bd18c
...
...
@@ -3066,66 +3066,6 @@ public class PmsProductExample {
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagIsNull
()
{
addCriterion
(
"del_flag is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagIsNotNull
()
{
addCriterion
(
"del_flag is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagEqualTo
(
Integer
value
)
{
addCriterion
(
"del_flag ="
,
value
,
"delFlag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagNotEqualTo
(
Integer
value
)
{
addCriterion
(
"del_flag <>"
,
value
,
"delFlag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagGreaterThan
(
Integer
value
)
{
addCriterion
(
"del_flag >"
,
value
,
"delFlag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"del_flag >="
,
value
,
"delFlag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagLessThan
(
Integer
value
)
{
addCriterion
(
"del_flag <"
,
value
,
"delFlag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"del_flag <="
,
value
,
"delFlag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"del_flag in"
,
values
,
"delFlag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"del_flag not in"
,
values
,
"delFlag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"del_flag between"
,
value1
,
value2
,
"delFlag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDelFlagNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"del_flag not between"
,
value1
,
value2
,
"delFlag"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteStatusIsNull
()
{
addCriterion
(
"delete_status is null"
);
return
(
Criteria
)
this
;
...
...
mall-mbg/src/main/java/com/macro/mall/model/dto/quanxing/PmsProductDto.java
0 → 100644
View file @
4d6bd18c
package
com
.
macro
.
mall
.
model
.
dto
.
quanxing
;
import
com.macro.mall.model.PmsProduct
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
PmsProductDto
extends
PmsProduct
implements
Serializable
{
@ApiModelProperty
(
value
=
"供应商名称"
)
private
String
mchtName
;
}
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductMapper.xml
View file @
4d6bd18c
...
...
@@ -49,7 +49,6 @@
<result
column=
"create_by"
jdbcType=
"BIGINT"
property=
"createBy"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"update_by"
jdbcType=
"BIGINT"
property=
"updateBy"
/>
<result
column=
"del_flag"
jdbcType=
"INTEGER"
property=
"delFlag"
/>
<result
column=
"delete_status"
jdbcType=
"INTEGER"
property=
"deleteStatus"
/>
<result
column=
"delivery_type"
jdbcType=
"INTEGER"
property=
"deliveryType"
/>
<result
column=
"cont_sign"
jdbcType=
"VARCHAR"
property=
"contSign"
/>
...
...
@@ -126,7 +125,7 @@
delivery_area, is_time_up, timer_date, market_date, product_origin, cost_price, bar_code,
virtual_sales, product_pic, pic_type, product_video, note, promotion_type, gift_growth,
gift_point, use_point_limit, spu_id, third_flag, create_date, create_by, update_date,
update_by, del
_flag, del
ete_status, delivery_type, cont_sign, commission, stock
update_by, delete_status, delivery_type, cont_sign, commission, stock
</sql>
<sql
id=
"Blob_Column_List"
>
description, detail_html
...
...
@@ -199,9 +198,9 @@
gift_growth, gift_point, use_point_limit,
spu_id, third_flag, create_date,
create_by, update_date, update_by,
del
_flag, delete_status, delivery_type
,
co
nt_sign, commission, stock
,
de
scription, de
tail_html)
del
ete_status, delivery_type, cont_sign
,
co
mmission, stock, description
,
detail_html)
values (#{name,jdbcType=VARCHAR}, #{mchtId,jdbcType=BIGINT}, #{publishStatus,jdbcType=INTEGER},
#{publishDate,jdbcType=TIMESTAMP}, #{verifyStatus,jdbcType=INTEGER}, #{newStatus,jdbcType=INTEGER},
#{brandId,jdbcType=BIGINT}, #{brandName,jdbcType=VARCHAR}, #{productCategoryId,jdbcType=BIGINT},
...
...
@@ -218,9 +217,9 @@
#{giftGrowth,jdbcType=INTEGER}, #{giftPoint,jdbcType=INTEGER}, #{usePointLimit,jdbcType=INTEGER},
#{spuId,jdbcType=VARCHAR}, #{thirdFlag,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
#{createBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=BIGINT},
#{del
Flag,jdbcType=INTEGER}, #{deleteStatus,jdbcType=INTEGER}, #{deliveryType,jdbcType=INTEGE
R},
#{co
ntSign,jdbcType=VARCHAR}, #{commission,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGE
R},
#{de
scription,jdbcType=LONGVARCHAR}, #{de
tailHtml,jdbcType=LONGVARCHAR})
#{del
eteStatus,jdbcType=INTEGER}, #{deliveryType,jdbcType=INTEGER}, #{contSign,jdbcType=VARCHA
R},
#{co
mmission,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER}, #{description,jdbcType=LONGVARCHA
R},
#{detailHtml,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.PmsProduct"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
...
...
@@ -366,9 +365,6 @@
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"delFlag != null"
>
del_flag,
</if>
<if
test=
"deleteStatus != null"
>
delete_status,
</if>
...
...
@@ -530,9 +526,6 @@
<if
test=
"updateBy != null"
>
#{updateBy,jdbcType=BIGINT},
</if>
<if
test=
"delFlag != null"
>
#{delFlag,jdbcType=INTEGER},
</if>
<if
test=
"deleteStatus != null"
>
#{deleteStatus,jdbcType=INTEGER},
</if>
...
...
@@ -706,9 +699,6 @@
<if
test=
"record.updateBy != null"
>
update_by = #{record.updateBy,jdbcType=BIGINT},
</if>
<if
test=
"record.delFlag != null"
>
del_flag = #{record.delFlag,jdbcType=INTEGER},
</if>
<if
test=
"record.deleteStatus != null"
>
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
</if>
...
...
@@ -784,7 +774,6 @@
create_by = #{record.createBy,jdbcType=BIGINT},
update_date = #{record.updateDate,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=BIGINT},
del_flag = #{record.delFlag,jdbcType=INTEGER},
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
delivery_type = #{record.deliveryType,jdbcType=INTEGER},
cont_sign = #{record.contSign,jdbcType=VARCHAR},
...
...
@@ -845,7 +834,6 @@
create_by = #{record.createBy,jdbcType=BIGINT},
update_date = #{record.updateDate,jdbcType=TIMESTAMP},
update_by = #{record.updateBy,jdbcType=BIGINT},
del_flag = #{record.delFlag,jdbcType=INTEGER},
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
delivery_type = #{record.deliveryType,jdbcType=INTEGER},
cont_sign = #{record.contSign,jdbcType=VARCHAR},
...
...
@@ -996,9 +984,6 @@
<if
test=
"updateBy != null"
>
update_by = #{updateBy,jdbcType=BIGINT},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag,jdbcType=INTEGER},
</if>
<if
test=
"deleteStatus != null"
>
delete_status = #{deleteStatus,jdbcType=INTEGER},
</if>
...
...
@@ -1071,7 +1056,6 @@
create_by = #{createBy,jdbcType=BIGINT},
update_date = #{updateDate,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=BIGINT},
del_flag = #{delFlag,jdbcType=INTEGER},
delete_status = #{deleteStatus,jdbcType=INTEGER},
delivery_type = #{deliveryType,jdbcType=INTEGER},
cont_sign = #{contSign,jdbcType=VARCHAR},
...
...
@@ -1129,7 +1113,6 @@
create_by = #{createBy,jdbcType=BIGINT},
update_date = #{updateDate,jdbcType=TIMESTAMP},
update_by = #{updateBy,jdbcType=BIGINT},
del_flag = #{delFlag,jdbcType=INTEGER},
delete_status = #{deleteStatus,jdbcType=INTEGER},
delivery_type = #{deliveryType,jdbcType=INTEGER},
cont_sign = #{contSign,jdbcType=VARCHAR},
...
...
mall-portal/src/main/java/com/macro/mall/portal/controller/quanxing/PmsProductController.java
View file @
4d6bd18c
...
...
@@ -32,8 +32,12 @@ public class PmsProductController {
@ApiParam
(
"供应商id"
)
@RequestParam
(
"mchtId"
)
Long
mchtId
,
@ApiParam
(
"审核状态:0->未审核;1->审核通过 2->驳回"
)
@RequestParam
(
"verifyStatus"
)
Integer
verifyStatus
,
@ApiParam
(
"上架状态:0->下架;1->上架"
)
@RequestParam
(
"publishStatus"
)
Integer
publishStatus
,
@ApiParam
(
"一级分类id"
)
@RequestParam
(
"productCategoryIdI"
)
Long
productCategoryIdI
,
@ApiParam
(
"一级分类id"
)
@RequestParam
(
"productCategoryId"
)
Long
productCategoryId
,
@ApiParam
(
"一级分类id"
)
@RequestParam
(
"productCategoryIdIII"
)
Long
productCategoryIdIII
,
@ApiParam
(
"排序:(例如根据价格降序 传入price DESC 根据价格升序传入price ASC) "
)
@RequestParam
(
"orderBy"
)
String
orderBy
){
return
CommonResult
.
success
(
CommonPage
.
restPage
(
this
.
pmsProductService
.
getAppPageList
(
page
,
size
,
name
,
newStatus
,
mchtId
,
verifyStatus
,
publishStatus
,
orderBy
)));
return
CommonResult
.
success
(
CommonPage
.
restPage
(
this
.
pmsProductService
.
getAppPageList
(
page
,
size
,
name
,
newStatus
,
mchtId
,
verifyStatus
,
publishStatus
,
productCategoryIdI
,
productCategoryId
,
productCategoryIdIII
,
orderBy
)));
}
@ApiOperation
(
"权星小程序_获取商品信息根据商品id"
)
...
...
mall-service/src/main/java/com/macro/mall/dao/product/PmsProductDao.java
View file @
4d6bd18c
...
...
@@ -8,6 +8,7 @@ import com.macro.mall.domain.vo.product.PmsProductResult;
import
com.macro.mall.domain.vo.product.RecommendProductVo
;
import
com.macro.mall.domain.vo.product.SimpleProductResult
;
import
com.macro.mall.model.PmsProduct
;
import
com.macro.mall.model.dto.quanxing.PmsProductDto
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
...
...
@@ -107,4 +108,5 @@ public interface PmsProductDao {
List
<
RecommendProductVo
>
getRecommendProduct
(
@Param
(
"brandId"
)
Long
brandId
);
List
<
PmsProductDto
>
selectProductListByOther
(
PmsProductDto
pmsProductDto
);
}
mall-service/src/main/java/com/macro/mall/service/product/PmsProductService.java
View file @
4d6bd18c
...
...
@@ -15,6 +15,7 @@ import com.macro.mall.domain.vo.product.SimpleProductResult;
import
com.macro.mall.model.PmsProduct
;
import
com.macro.mall.model.PmsProductLabelRelation
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.quanxing.PmsProductDto
;
import
com.macro.mall.model.dto.quanxing.common.BatchOperationDto
;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Propagation
;
...
...
@@ -175,7 +176,7 @@ public interface PmsProductService {
* @param name
* @return
*/
List
<
PmsProduct
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
,
Integer
auditStatus
);
List
<
PmsProduct
Dto
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
,
Integer
auditStatus
,
String
mchtName
);
/**
* 根据Id修改传入参数
...
...
@@ -205,7 +206,8 @@ public interface PmsProductService {
* @param newStatus
* @return
*/
List
<
PmsProduct
>
getAppPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
,
Integer
newStatus
,
Long
mchtId
,
Integer
verifyStatus
,
Integer
publishStatus
,
String
orderBy
);
List
<
PmsProduct
>
getAppPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
,
Integer
newStatus
,
Long
mchtId
,
Integer
verifyStatus
,
Integer
publishStatus
,
Long
productCategoryIdI
,
Long
productCategoryId
,
Long
productCategoryIdIII
,
String
orderBy
);
/**
* 获取供应商个人中心商品状态
...
...
mall-service/src/main/java/com/macro/mall/service/product/impl/PmsProductServiceImpl.java
View file @
4d6bd18c
...
...
@@ -20,6 +20,7 @@ import com.macro.mall.domain.vo.product.SimpleProductResult;
import
com.macro.mall.mapper.*
;
import
com.macro.mall.model.*
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.quanxing.PmsProductDto
;
import
com.macro.mall.model.dto.quanxing.common.BatchOperationDto
;
import
com.macro.mall.repository.PmsCommentRepository
;
import
com.macro.mall.repository.PmsProductLabelRelationRepository
;
...
...
@@ -776,18 +777,13 @@ public class PmsProductServiceImpl implements PmsProductService {
* @return
*/
@Override
public
List
<
PmsProduct
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
,
Integer
verifyStatus
){
public
List
<
PmsProduct
Dto
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
,
Integer
verifyStatus
,
String
mchtName
){
PageHelper
.
startPage
(
pageNum
,
pageSize
);
PmsProductExample
example
=
new
PmsProductExample
();
PmsProductExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
name
!=
null
&&
!
""
.
equals
(
name
)){
criteria
.
andNameLike
(
"%"
+
"name"
+
"%"
);
}
if
(
verifyStatus
!=
null
){
criteria
.
andVerifyStatusEqualTo
(
verifyStatus
);
}
criteria
.
andDeleteStatusEqualTo
(
0
);
//删除标识0 未删除 1已删除(彻底删除)
return
this
.
pmsProductMapper
.
selectByExample
(
example
);
PmsProductDto
pmsProductDto
=
new
PmsProductDto
();
pmsProductDto
.
setName
(
name
);
pmsProductDto
.
setVerifyStatus
(
verifyStatus
);
pmsProductDto
.
setMchtName
(
mchtName
);
return
this
.
pmsProductDao
.
selectProductListByOther
(
pmsProductDto
);
}
/**
...
...
@@ -880,7 +876,8 @@ public class PmsProductServiceImpl implements PmsProductService {
* @return
*/
@Override
public
List
<
PmsProduct
>
getAppPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
,
Integer
newStatus
,
Long
mchtId
,
Integer
verifyStatus
,
Integer
publishStatus
,
String
orderBy
){
public
List
<
PmsProduct
>
getAppPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
,
Integer
newStatus
,
Long
mchtId
,
Integer
verifyStatus
,
Integer
publishStatus
,
Long
productCategoryIdI
,
Long
productCategoryId
,
Long
productCategoryIdIII
,
String
orderBy
){
PageHelper
.
startPage
(
pageNum
,
pageSize
);
PmsProductExample
example
=
new
PmsProductExample
();
PmsProductExample
.
Criteria
criteria
=
example
.
createCriteria
();
...
...
@@ -899,9 +896,7 @@ public class PmsProductServiceImpl implements PmsProductService {
pmsSearchWord
.
setUpdateDate
(
new
Date
());
pmsSearchWordMapper
.
insertSelective
(
pmsSearchWord
);
}
}
if
(
newStatus
!=
null
){
criteria
.
andNewStatusEqualTo
(
newStatus
);
}
...
...
@@ -916,6 +911,15 @@ public class PmsProductServiceImpl implements PmsProductService {
if
(
publishStatus
!=
null
){
criteria
.
andPublishStatusEqualTo
(
publishStatus
);
}
if
(
productCategoryIdI
!=
null
){
criteria
.
andProductCategoryIdIEqualTo
(
productCategoryIdI
);
}
if
(
productCategoryId
!=
null
){
criteria
.
andProductCategoryIdEqualTo
(
productCategoryId
);
}
if
(
productCategoryIdIII
!=
null
){
criteria
.
andProductCategoryIdIiiEqualTo
(
productCategoryIdIII
);
}
criteria
.
andDeleteStatusEqualTo
(
0
);
//删除标识0 未删除 1已删除(彻底删除)
//注意:排序使用的是列名
example
.
setOrderByClause
(
orderBy
);
...
...
mall-service/src/main/resources/com/macro/mall/dao/product/PmsProductDao.xml
View file @
4d6bd18c
...
...
@@ -2,6 +2,10 @@
<!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.PmsProductDao"
>
<resultMap
id=
"BaseResultMap"
type=
"com.macro.mall.model.dto.quanxing.PmsProductDto"
extends=
"com.macro.mall.mapper.PmsProductMapper.BaseResultMap"
>
<result
column=
"mchtName"
jdbcType=
"VARCHAR"
property=
"mchtName"
/>
</resultMap>
<select
id=
"getMchtProductList"
resultType =
"com.macro.mall.domain.vo.MchtProductResult"
parameterType =
"com.macro.mall.domain.dto.MchtProductQueryParam"
>
select
p.id as productId,
...
...
@@ -586,5 +590,19 @@
limit 0,6
</select>
<select
id=
"selectProductListByOther"
parameterType=
"com.macro.mall.model.dto.quanxing.PmsProductDto"
resultMap=
"BaseResultMap"
>
SELECT a.*,b.name from pms_product a
LEFT JOIN ums_member b ON a.mcht_id = b.id
WHERE a.delete_status = 0
<if
test=
"verifyStatus != null"
>
AND a.verify_status = #{verifyStatus}
</if>
<if
test=
"name != null and name != ''"
>
AND a.name like CONCAT('%',#{name},'%')
</if>
<if
test=
"mchtName != null and mchtName != ''"
>
AND b.name like CONCAT('%',#{mchtName},'%')
</if>
</select>
</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