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
2bbcb6e2
Commit
2bbcb6e2
authored
Jun 11, 2020
by
XiaHou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权星相关接口修复
parent
a5ce43c5
Show whitespace changes
Inline
Side-by-side
Showing
62 changed files
with
124 additions
and
3294 deletions
+124
-3294
PmsProductAttributeCategoryController.java
...all/controller/PmsProductAttributeCategoryController.java
+1
-1
PmsProductAttributeTypeController.java
...ro/mall/controller/PmsProductAttributeTypeController.java
+1
-1
PmsProductController.java
.../java/com/macro/mall/controller/PmsProductController.java
+3
-2
PmsSupplierAuditController.java
.../mall/controller/quanxing/PmsSupplierAuditController.java
+1
-1
PmsProduct.java
mall-mbg/src/main/java/com/macro/mall/model/PmsProduct.java
+12
-0
PmsProductExample.java
...src/main/java/com/macro/mall/model/PmsProductExample.java
+60
-0
PmsProductMapper.xml
...main/resources/com/macro/mall/mapper/PmsProductMapper.xml
+41
-23
AdController.java
...n/java/com/macro/mall/portal/controller/AdController.java
+0
-74
BrandController.java
...ava/com/macro/mall/portal/controller/BrandController.java
+0
-36
CommentController.java
...a/com/macro/mall/portal/controller/CommentController.java
+0
-32
HomeController.java
...java/com/macro/mall/portal/controller/HomeController.java
+0
-110
MchtShopController.java
.../com/macro/mall/portal/controller/MchtShopController.java
+0
-62
MemberReadHistoryController.java
...o/mall/portal/controller/MemberReadHistoryController.java
+0
-63
OmsComplaintApplicationController.java
.../portal/controller/OmsComplaintApplicationController.java
+0
-92
OmsPortalOrderReturnApplyController.java
...ortal/controller/OmsPortalOrderReturnApplyController.java
+0
-36
OmsPortalOrderReturnReasonController.java
...rtal/controller/OmsPortalOrderReturnReasonController.java
+0
-35
PmsAreaController.java
...a/com/macro/mall/portal/controller/PmsAreaController.java
+0
-33
PmsAttributeController.java
.../macro/mall/portal/controller/PmsAttributeController.java
+0
-36
PmsCategoryController.java
...m/macro/mall/portal/controller/PmsCategoryController.java
+0
-52
PmsCommodityReportController.java
.../mall/portal/controller/PmsCommodityReportController.java
+0
-99
PmsProductController.java
...om/macro/mall/portal/controller/PmsProductController.java
+0
-124
SearchController.java
...va/com/macro/mall/portal/controller/SearchController.java
+0
-81
SmsController.java
.../java/com/macro/mall/portal/controller/SmsController.java
+0
-35
StallController.java
...ava/com/macro/mall/portal/controller/StallController.java
+0
-55
UmsActivityTrainingController.java
...mall/portal/controller/UmsActivityTrainingController.java
+0
-65
UmsMemberCollectController.java
...ro/mall/portal/controller/UmsMemberCollectController.java
+0
-61
UmsMemberReceiveAddressController.java
.../portal/controller/UmsMemberReceiveAddressController.java
+0
-92
UmsWithdrawalReviewController.java
...mall/portal/controller/UmsWithdrawalReviewController.java
+0
-91
SmsActivityController.java
...all/portal/controller/activity/SmsActivityController.java
+0
-56
UmsAfterSalesController.java
...portal/controller/aftersaler/UmsAfterSalesController.java
+0
-117
CmsArticleController.java
.../mall/portal/controller/article/CmsArticleController.java
+0
-73
SmsCouponController.java
...ro/mall/portal/controller/coupon/SmsCouponController.java
+0
-41
UmsMemberCouponController.java
...l/portal/controller/coupon/UmsMemberCouponController.java
+0
-66
CmsCustomColumnController.java
...al/controller/customcolumn/CmsCustomColumnController.java
+0
-41
PmsDmchtController.java
...ortal/controller/distributionmcht/PmsDmchtController.java
+0
-64
UmsFeedbackController.java
...all/portal/controller/feedback/UmsFeedbackController.java
+0
-53
HhomeController.java
...m/macro/mall/portal/controller/hhome/HhomeController.java
+0
-56
HShopSearchController.java
.../portal/controller/hshopsearch/HShopSearchController.java
+0
-39
IntegralGiftController.java
...ll/portal/controller/integral/IntegralGiftController.java
+0
-29
SysRechargeConfigController.java
...rtal/controller/integral/SysRechargeConfigController.java
+0
-52
UmsIntegralController.java
...all/portal/controller/integral/UmsIntegralController.java
+0
-73
SmsFullReductionPromotionController.java
...roller/marketing/SmsFullReductionPromotionController.java
+0
-32
SmsSeckillPromotionController.java
...l/controller/marketing/SmsSeckillPromotionController.java
+0
-41
MemberAccountController.java
...all/portal/controller/member/MemberAccountController.java
+0
-54
MemberLevelController.java
.../mall/portal/controller/member/MemberLevelController.java
+0
-53
UmsMessageController.java
.../mall/portal/controller/message/UmsMessageController.java
+0
-68
OnlineStoreController.java
.../portal/controller/onlinestore/OnlineStoreController.java
+0
-87
ShopGoodsController.java
...ll/portal/controller/onlinestore/ShopGoodsController.java
+0
-61
WebShopOrderController.java
...portal/controller/onlinestore/WebShopOrderController.java
+0
-44
AliPayController.java
.../macro/mall/portal/controller/order/AliPayController.java
+0
-25
OmsCartItemController.java
...o/mall/portal/controller/order/OmsCartItemController.java
+0
-136
OmsPortalOrderController.java
...all/portal/controller/order/OmsPortalOrderController.java
+0
-158
PayController.java
...com/macro/mall/portal/controller/order/PayController.java
+0
-31
UmsPromoteController.java
.../mall/portal/controller/promote/UmsPromoteController.java
+0
-72
PmsMarketServiceController.java
.../controller/servicemarket/PmsMarketServiceController.java
+0
-56
PmsSmchtShopInfoController.java
.../controller/servicemarket/PmsSmchtShopInfoController.java
+0
-52
MchtSpellGoodsController.java
...ortal/controller/spellgoods/MchtSpellGoodsController.java
+0
-46
SpellGoodsController.java
...ll/portal/controller/spellgoods/SpellGoodsController.java
+0
-41
YzCallbackController.java
...o/mall/portal/controller/youzan/YzCallbackController.java
+0
-39
YzProductController.java
...ro/mall/portal/controller/youzan/YzProductController.java
+0
-43
PmsProductService.java
...ava/com/macro/mall/service/product/PmsProductService.java
+1
-1
PmsProductServiceImpl.java
...acro/mall/service/product/impl/PmsProductServiceImpl.java
+4
-2
No files found.
mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeCategoryController.java
View file @
2bbcb6e2
...
...
@@ -19,7 +19,7 @@ import java.util.List;
* Created by macro on 2018/4/26.
*/
@Controller
@Api
(
tags
=
"
商品属性分类管理
"
,
description
=
"商品属性分类管理"
)
@Api
(
tags
=
"
权星后台_商品分类相关接口
"
,
description
=
"商品属性分类管理"
)
@RequestMapping
(
"/productAttribute/category"
)
public
class
PmsProductAttributeCategoryController
{
@Resource
...
...
mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeTypeController.java
View file @
2bbcb6e2
...
...
@@ -18,7 +18,7 @@ import java.util.List;
* 类型(属性)管理
*/
@Controller
@Api
(
tags
=
"
类型(属性)管
"
,
description
=
"类型(属性)管理"
)
@Api
(
tags
=
"
权星后台_属性和规格相关接口
"
,
description
=
"类型(属性)管理"
)
@RequestMapping
(
"/productAttribute/type"
)
public
class
PmsProductAttributeTypeController
{
@Resource
...
...
mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java
View file @
2bbcb6e2
...
...
@@ -66,8 +66,9 @@ public class PmsProductController {
@ResponseBody
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
<
CommonPage
<
PmsProduct
>>
getPageList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"page"
)
Integer
page
,
@ApiParam
(
"每页大小"
)
@RequestParam
(
"size"
)
Integer
size
,
@ApiParam
(
"模糊查询商品名称 "
)
@RequestParam
(
"name"
)
String
name
){
return
CommonResult
.
success
(
CommonPage
.
restPage
(
this
.
productService
.
getPageList
(
page
,
size
,
name
)));
@ApiParam
(
"模糊查询商品名称 "
)
@RequestParam
(
"name"
)
String
name
,
@ApiParam
(
"审核状态 0待审核 1审核通过 2审核未通过 "
)
@RequestParam
(
"auditStatus"
)
Integer
auditStatus
){
return
CommonResult
.
success
(
CommonPage
.
restPage
(
this
.
productService
.
getPageList
(
page
,
size
,
name
,
auditStatus
)));
}
@ApiOperation
(
"权星后台_根据商品id修改一条商品数据"
)
...
...
mall-admin/src/main/java/com/macro/mall/controller/quanxing/PmsSupplierAuditController.java
View file @
2bbcb6e2
...
...
@@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.*;
@Controller
@RequestMapping
(
"/pmsSupplierAudit"
)
@Api
(
tags
=
"权星
申请供应商
"
,
description
=
"申请供应商控制器"
)
@Api
(
tags
=
"权星
后台_供应商相关接口
"
,
description
=
"申请供应商控制器"
)
public
class
PmsSupplierAuditController
{
@Autowired
...
...
mall-mbg/src/main/java/com/macro/mall/model/PmsProduct.java
View file @
2bbcb6e2
...
...
@@ -169,6 +169,9 @@ public class PmsProduct implements Serializable {
@ApiModelProperty
(
value
=
"分销佣金"
)
private
BigDecimal
commission
;
@ApiModelProperty
(
value
=
"审核状态 0待审核 1审核通过 2审核未通过"
)
private
Integer
auditStatus
;
@ApiModelProperty
(
value
=
"商品描述"
)
private
String
description
;
...
...
@@ -593,6 +596,14 @@ public class PmsProduct implements Serializable {
this
.
commission
=
commission
;
}
public
Integer
getAuditStatus
()
{
return
auditStatus
;
}
public
void
setAuditStatus
(
Integer
auditStatus
)
{
this
.
auditStatus
=
auditStatus
;
}
public
String
getDescription
()
{
return
description
;
}
...
...
@@ -667,6 +678,7 @@ public class PmsProduct implements Serializable {
sb
.
append
(
", deliveryType="
).
append
(
deliveryType
);
sb
.
append
(
", contSign="
).
append
(
contSign
);
sb
.
append
(
", commission="
).
append
(
commission
);
sb
.
append
(
", auditStatus="
).
append
(
auditStatus
);
sb
.
append
(
", description="
).
append
(
description
);
sb
.
append
(
", detailHtml="
).
append
(
detailHtml
);
sb
.
append
(
", serialVersionUID="
).
append
(
serialVersionUID
);
...
...
mall-mbg/src/main/java/com/macro/mall/model/PmsProductExample.java
View file @
2bbcb6e2
...
...
@@ -3375,6 +3375,66 @@ public class PmsProductExample {
addCriterion
(
"commission not between"
,
value1
,
value2
,
"commission"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusIsNull
()
{
addCriterion
(
"audit_status is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusIsNotNull
()
{
addCriterion
(
"audit_status is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusEqualTo
(
Integer
value
)
{
addCriterion
(
"audit_status ="
,
value
,
"auditStatus"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusNotEqualTo
(
Integer
value
)
{
addCriterion
(
"audit_status <>"
,
value
,
"auditStatus"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusGreaterThan
(
Integer
value
)
{
addCriterion
(
"audit_status >"
,
value
,
"auditStatus"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusGreaterThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"audit_status >="
,
value
,
"auditStatus"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusLessThan
(
Integer
value
)
{
addCriterion
(
"audit_status <"
,
value
,
"auditStatus"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusLessThanOrEqualTo
(
Integer
value
)
{
addCriterion
(
"audit_status <="
,
value
,
"auditStatus"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"audit_status in"
,
values
,
"auditStatus"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusNotIn
(
List
<
Integer
>
values
)
{
addCriterion
(
"audit_status not in"
,
values
,
"auditStatus"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"audit_status between"
,
value1
,
value2
,
"auditStatus"
);
return
(
Criteria
)
this
;
}
public
Criteria
andAuditStatusNotBetween
(
Integer
value1
,
Integer
value2
)
{
addCriterion
(
"audit_status not between"
,
value1
,
value2
,
"auditStatus"
);
return
(
Criteria
)
this
;
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
mall-mbg/src/main/resources/com/macro/mall/mapper/PmsProductMapper.xml
View file @
2bbcb6e2
...
...
@@ -54,6 +54,7 @@
<result
column=
"delivery_type"
jdbcType=
"INTEGER"
property=
"deliveryType"
/>
<result
column=
"cont_sign"
jdbcType=
"VARCHAR"
property=
"contSign"
/>
<result
column=
"commission"
jdbcType=
"DECIMAL"
property=
"commission"
/>
<result
column=
"audit_status"
jdbcType=
"INTEGER"
property=
"auditStatus"
/>
</resultMap>
<resultMap
extends=
"BaseResultMap"
id=
"ResultMapWithBLOBs"
type=
"com.macro.mall.model.PmsProduct"
>
<result
column=
"description"
jdbcType=
"LONGVARCHAR"
property=
"description"
/>
...
...
@@ -125,7 +126,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, delete_status, delivery_type, cont_sign, commission
update_by, del_flag, delete_status, delivery_type, cont_sign, commission
, audit_status
</sql>
<sql
id=
"Blob_Column_List"
>
description, detail_html
...
...
@@ -179,14 +180,11 @@
</if>
</delete>
<insert
id=
"insert"
parameterType=
"com.macro.mall.model.PmsProduct"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into pms_product (name, mcht_id, publish_status,
publish_date, verify_status, new_status,
brand_id, brand_name, product_category_id,
product_category_id_iii, product_category_id_i,
feight_template_id, product_attribute_category_id,
insert into pms_product (id, name, mcht_id,
publish_status, publish_date, verify_status,
new_status, brand_id, brand_name,
product_category_id, product_category_id_iii,
product_category_id_i, feight_template_id, product_attribute_category_id,
product_sn, recommand_status, sort,
price, sub_title, low_stock,
unit, weight, keywords,
...
...
@@ -199,13 +197,13 @@
spu_id, third_flag, create_date,
create_by, update_date, update_by,
del_flag, delete_status, delivery_type,
cont_sign, commission,
description
,
detail_html)
values (#{
name,jdbcType=VARCHAR}, #{mchtId,jdbcType=BIGINT}, #{publishStatus,jdbcType=INTEGER
},
#{publish
Date,jdbcType=TIMESTAMP}, #{verifyStatus,jdbcType=INTEGER}, #{new
Status,jdbcType=INTEGER},
#{
brandId,jdbcType=BIGINT}, #{brandName,jdbcType=VARCHAR}, #{productCategoryId,jdbcType=BIGINT
},
#{productCategoryId
Iii,jdbcType=BIGINT}, #{productCategoryIdI
,jdbcType=BIGINT},
#{feightTemplateId,jdbcType=BIGINT}, #{productAttributeCategoryId,jdbcType=BIGINT},
cont_sign, commission,
audit_status
,
de
scription, de
tail_html)
values (#{
id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{mchtId,jdbcType=BIGINT
},
#{publish
Status,jdbcType=INTEGER}, #{publishDate,jdbcType=TIMESTAMP}, #{verify
Status,jdbcType=INTEGER},
#{
newStatus,jdbcType=INTEGER}, #{brandId,jdbcType=BIGINT}, #{brandName,jdbcType=VARCHAR
},
#{productCategoryId
,jdbcType=BIGINT}, #{productCategoryIdIii
,jdbcType=BIGINT},
#{
productCategoryIdI,jdbcType=BIGINT}, #{
feightTemplateId,jdbcType=BIGINT}, #{productAttributeCategoryId,jdbcType=BIGINT},
#{productSn,jdbcType=VARCHAR}, #{recommandStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{price,jdbcType=DECIMAL}, #{subTitle,jdbcType=VARCHAR}, #{lowStock,jdbcType=INTEGER},
#{unit,jdbcType=VARCHAR}, #{weight,jdbcType=DECIMAL}, #{keywords,jdbcType=VARCHAR},
...
...
@@ -218,15 +216,15 @@
#{spuId,jdbcType=VARCHAR}, #{thirdFlag,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
#{createBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=BIGINT},
#{delFlag,jdbcType=INTEGER}, #{deleteStatus,jdbcType=INTEGER}, #{deliveryType,jdbcType=INTEGER},
#{contSign,jdbcType=VARCHAR}, #{commission,jdbcType=DECIMAL}, #{
description,jdbcType=LONGVARCHA
R},
#{detailHtml,jdbcType=LONGVARCHAR})
#{contSign,jdbcType=VARCHAR}, #{commission,jdbcType=DECIMAL}, #{
auditStatus,jdbcType=INTEGE
R},
#{de
scription,jdbcType=LONGVARCHAR}, #{de
tailHtml,jdbcType=LONGVARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.macro.mall.model.PmsProduct"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Long"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into pms_product
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"name != null"
>
name,
</if>
...
...
@@ -380,6 +378,9 @@
<if
test=
"commission != null"
>
commission,
</if>
<if
test=
"auditStatus != null"
>
audit_status,
</if>
<if
test=
"description != null"
>
description,
</if>
...
...
@@ -388,6 +389,9 @@
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"name != null"
>
#{name,jdbcType=VARCHAR},
</if>
...
...
@@ -541,6 +545,9 @@
<if
test=
"commission != null"
>
#{commission,jdbcType=DECIMAL},
</if>
<if
test=
"auditStatus != null"
>
#{auditStatus,jdbcType=INTEGER},
</if>
<if
test=
"description != null"
>
#{description,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -714,6 +721,9 @@
<if
test=
"record.commission != null"
>
commission = #{record.commission,jdbcType=DECIMAL},
</if>
<if
test=
"record.auditStatus != null"
>
audit_status = #{record.auditStatus,jdbcType=INTEGER},
</if>
<if
test=
"record.description != null"
>
description = #{record.description,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -779,6 +789,7 @@
delivery_type = #{record.deliveryType,jdbcType=INTEGER},
cont_sign = #{record.contSign,jdbcType=VARCHAR},
commission = #{record.commission,jdbcType=DECIMAL},
audit_status = #{record.auditStatus,jdbcType=INTEGER},
description = #{record.description,jdbcType=LONGVARCHAR},
detail_html = #{record.detailHtml,jdbcType=LONGVARCHAR}
<if
test=
"_parameter != null"
>
...
...
@@ -838,7 +849,8 @@
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
delivery_type = #{record.deliveryType,jdbcType=INTEGER},
cont_sign = #{record.contSign,jdbcType=VARCHAR},
commission = #{record.commission,jdbcType=DECIMAL}
commission = #{record.commission,jdbcType=DECIMAL},
audit_status = #{record.auditStatus,jdbcType=INTEGER}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -999,6 +1011,9 @@
<if
test=
"commission != null"
>
commission = #{commission,jdbcType=DECIMAL},
</if>
<if
test=
"auditStatus != null"
>
audit_status = #{auditStatus,jdbcType=INTEGER},
</if>
<if
test=
"description != null"
>
description = #{description,jdbcType=LONGVARCHAR},
</if>
...
...
@@ -1061,6 +1076,7 @@
delivery_type = #{deliveryType,jdbcType=INTEGER},
cont_sign = #{contSign,jdbcType=VARCHAR},
commission = #{commission,jdbcType=DECIMAL},
audit_status = #{auditStatus,jdbcType=INTEGER},
description = #{description,jdbcType=LONGVARCHAR},
detail_html = #{detailHtml,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
...
...
@@ -1117,7 +1133,8 @@
delete_status = #{deleteStatus,jdbcType=INTEGER},
delivery_type = #{deliveryType,jdbcType=INTEGER},
cont_sign = #{contSign,jdbcType=VARCHAR},
commission = #{commission,jdbcType=DECIMAL}
commission = #{commission,jdbcType=DECIMAL},
audit_status = #{auditStatus,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
mall-portal/src/main/java/com/macro/mall/portal/controller/AdController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsAd
;
import
com.macro.mall.portal.service.PmsAdService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author chenwf
* @date 2020/3/5
*/
@Controller
@Api
(
tags
=
"广告相关接口"
,
description
=
"广告相关接口"
)
public
class
AdController
{
@Resource
private
PmsAdService
pmsAdService
;
@ApiOperation
(
"获取广告列表"
)
@RequestMapping
(
value
=
"/api/z/ad/getAdList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsAd
>>
getAdList
(
@ApiParam
(
"广告位置编号,多个以逗号隔开"
+
"1001 平台首页顶部横幅\n"
+
"1002 会员/供应商/服务商首页横幅\n"
+
"1003 页面右侧悬浮\n"
+
"1004 平台首页中部上广告轮播图\n"
+
"1005 平台首页中部下左广告轮播图\n"
+
"1006 平台首页中部下右广告轮播图\n"
+
"1007 新品上架页上部广告横幅\n"
+
"1008 新品上架页下部广告横幅\n"
+
"1009 逛市场页上部广告横幅\n"
+
"1010 逛市场页下部广告横幅\n"
+
"1011 找货必看页上部广告横幅\n"
+
"1012 找货必看页下部广告横幅\n"
+
"1013 品牌专区页上部广告横幅\n"
+
"1014 品牌专区页下部广告横幅\n"
+
"1015 视频专区页上部广告横幅\n"
+
"1016 视频专区页下部广告横幅\n"
+
"1017 活动培训页上部广告横幅\n"
+
"1018 活动培训页下部广告横幅\n"
+
"1019 优惠促销页上部广告横幅\n"
+
"1020 优惠促销页下部广告横幅\n"
+
"1021 积分商城页上部广告横幅\n"
+
"1022 积分商城页下部广告横幅\n"
+
"1023 服务市场首页页上部广告横幅\n"
+
"1024 会员首页左侧栏竖幅广告短\n"
+
"1025 会员首页左侧栏竖幅广告长\n"
+
"1026 供应商首页左侧栏竖幅广告短\n"
+
"1027 供应商首页左侧栏竖幅广告长\n"
+
"1028 服务商首页左侧栏竖幅广告短\n"
+
"1029 服务商会员首页左侧栏竖幅广告长\n"
+
"1030 注册登录页商城左侧展示"
)
@RequestParam
String
adPositionTypes
,
@ApiParam
(
"商家id"
)
@RequestParam
(
required
=
false
)
Long
mchtId
)
{
List
<
PmsAd
>
ads
=
pmsAdService
.
getAdList
(
adPositionTypes
,
mchtId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
ads
));
}
@ApiOperation
(
"更新广告点击次数"
)
@RequestMapping
(
value
=
"/api/z/ad/addAdShowNum"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
addAdShowNum
(
@ApiParam
(
"广告id"
)
@RequestParam
Long
adId
)
{
pmsAdService
.
addAdShowNum
(
adId
);
return
CommonResult
.
success
(
null
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/BrandController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsBrand
;
import
com.macro.mall.portal.domain.Vo.BrandQueryVo
;
import
com.macro.mall.portal.service.BrandService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.stereotype.Controller
;
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.ResponseBody
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author chenwf
* @date 2020/2/26
*/
@Controller
@Api
(
tags
=
"品牌相关接口"
,
description
=
"品牌相关接口"
)
public
class
BrandController
{
@Resource
private
BrandService
brandService
;
@ApiOperation
(
"获取商家商品列表"
)
@RequestMapping
(
value
=
"/api/z/brand/getBrandList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsBrand
>>
getBrandList
(
@RequestBody
BrandQueryVo
brandQueryVo
)
{
List
<
PmsBrand
>
brands
=
brandService
.
getBrandList
(
brandQueryVo
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
brands
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/CommentController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsMchtCommentScore
;
import
com.macro.mall.portal.domain.CommentParam
;
import
com.macro.mall.portal.service.PmsCommentService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author chenwf
* @date 2020/2/24
*/
@Controller
@Api
(
tags
=
"评价相关接口"
,
description
=
"评价相关接口"
)
public
class
CommentController
{
@Resource
private
PmsCommentService
pmsCommentService
;
@ApiOperation
(
value
=
"评论"
)
@PostMapping
(
value
=
"/api/y/comment/create"
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
CommentParam
commentParam
,
HttpServletRequest
request
)
{
pmsCommentService
.
create
(
commentParam
,
request
);
return
CommonResult
.
success
(
null
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/HomeController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.order.OrderListParam
;
import
com.macro.mall.domain.vo.mcht.MchtBaseInfoResult
;
import
com.macro.mall.domain.vo.mcht.ShopStallResult
;
import
com.macro.mall.model.CmsMessage
;
import
com.macro.mall.model.dto.OmsOrderSonVo
;
import
com.macro.mall.portal.domain.*
;
import
com.macro.mall.domain.dto.mcht.ShopStallQueryVo
;
import
com.macro.mall.portal.domain.storey.StoreyResult
;
import
com.macro.mall.portal.service.HomeService
;
import
com.macro.mall.portal.service.PmsStallPositionManageService
;
import
com.macro.mall.service.order.OmsPortalOrderService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 首页内容管理Controller
* Created by macro on 2019/1/28.
*/
@Controller
@Api
(
tags
=
"首页内容管理"
,
description
=
"首页内容管理"
)
public
class
HomeController
{
@Resource
private
HomeService
homeService
;
@Resource
private
PmsStallPositionManageService
pmsStallPositionManageService
;
@Autowired
private
OmsPortalOrderService
portalOrderService
;
@ApiOperation
(
"首页基础数据"
)
@RequestMapping
(
value
=
"/api/z/home/baseInfo"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
HomeBaseInfoResult
>
getHomeBaseInfo
()
{
HomeBaseInfoResult
baseInfoResult
=
homeService
.
getHomeBaseInfo
();
return
CommonResult
.
success
(
baseInfoResult
);
}
@GetMapping
(
value
=
"/api/z/home/order"
)
@ApiOperation
(
"全站订单展示"
)
@ResponseBody
public
CommonResult
<
CommonPage
<
OmsOrderSonVo
>>
orderHotList
(
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
)
{
OrderListParam
orderListParam
=
new
OrderListParam
();
orderListParam
.
setStatus
(
3
);
List
<
OmsOrderSonVo
>
list
=
portalOrderService
.
list
(
orderListParam
,
pageSize
,
pageNum
,
null
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@ApiOperation
(
"首页楼层展示内容"
)
@RequestMapping
(
value
=
"/api/z/home/getStoreyContent"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
StoreyResult
>>
getStoreyContent
(
@ApiParam
(
"楼层管理id"
)
@RequestParam
(
required
=
false
)
Long
storeyManageId
,
@ApiParam
(
"页码"
)
@RequestParam
(
required
=
false
)
Integer
pageNum
)
{
pageNum
=
1
;
List
<
StoreyResult
>
storeyResults
=
homeService
.
getStoreyContent
(
storeyManageId
,
pageNum
);
return
CommonResult
.
success
(
storeyResults
);
}
@ApiOperation
(
"获取首页左侧类目&&档口"
)
@RequestMapping
(
value
=
"/api/z/home/homeCategory"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
HomeCategoryResult
>>
homeCategory
()
{
List
<
HomeCategoryResult
>
homeCategoryResults
=
homeService
.
homeCategory
();
return
CommonResult
.
success
(
homeCategoryResults
);
}
@ApiOperation
(
"获取本级类目和本级对应的子集类目"
)
@RequestMapping
(
value
=
"/api/z/home/homeSubCategory"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
CategoryCommonResult
>>
homeSubCategory
(
@ApiParam
(
"类目id"
)
@RequestParam
Long
cagegoryId
)
{
List
<
CategoryCommonResult
>
categoryCommonResults
=
homeService
.
homeSubCategory
(
cagegoryId
);
return
CommonResult
.
success
(
categoryCommonResults
);
}
@ApiOperation
(
"档口市(首页档口市场商家列表)"
)
@RequestMapping
(
value
=
"/api/z/home/getHomeStallList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
ShopStallResult
>>
getHomeStallList
(
@ModelAttribute
ShopStallQueryVo
stallQueryVo
)
{
List
<
ShopStallResult
>
shopStallResults
=
pmsStallPositionManageService
.
getStallMchtShopList
(
stallQueryVo
,
false
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
shopStallResults
));
}
@ApiOperation
(
"首页商家金额排行榜"
)
@RequestMapping
(
value
=
"/api/z/home/getMchtAmounTrankList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
MchtBaseInfoResult
>>
getMchtAmounTrankList
()
{
List
<
MchtBaseInfoResult
>
mchtBaseInfoResults
=
homeService
.
getMchtAmounTrankList
();
return
CommonResult
.
success
(
mchtBaseInfoResults
);
}
@ApiOperation
(
"首页公告"
)
@RequestMapping
(
value
=
"/api/z/home/getHomeNotice"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
CmsMessage
>>
getHomeNotice
(
@ApiParam
(
"发送对象(1买家2卖家3服务商)"
)
@RequestParam
Integer
type
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"4"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
CmsMessage
>
cmsMessages
=
homeService
.
getHomeNotice
(
type
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
cmsMessages
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/MchtShopController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.MchtProductQueryParam
;
import
com.macro.mall.domain.dto.mcht.ShopQueryVo
;
import
com.macro.mall.domain.vo.MchtProductResult
;
import
com.macro.mall.domain.vo.mcht.MchtBaseInfoResult
;
import
com.macro.mall.domain.vo.mcht.MchtShopInfoResult
;
import
com.macro.mall.domain.vo.mcht.ShopStallResult
;
import
com.macro.mall.service.mcht.MchtShopInfoService
;
import
com.macro.mall.service.product.PmsProductService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Controller
@Api
(
tags
=
"商家店铺相关接口"
,
description
=
"商家店铺相关接口"
)
public
class
MchtShopController
{
@Resource
private
PmsProductService
pmsProductService
;
@Resource
private
MchtShopInfoService
mchtShopInfoService
;
@ApiOperation
(
"获取商家商品列表"
)
@RequestMapping
(
value
=
"/api/z/mchtShop/getMchtProductList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
MchtProductResult
>>
getMchtProductList
(
@RequestBody
MchtProductQueryParam
mchtProductQueryParam
)
{
List
<
MchtProductResult
>
mchtProductList
=
pmsProductService
.
getMchtProductList
(
mchtProductQueryParam
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
mchtProductList
));
}
@ApiOperation
(
"获取商家店铺信息(关于店铺)"
)
@RequestMapping
(
value
=
"/api/z/mchtShop/getMchtShopInfo"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
MchtShopInfoResult
>
getMchtProductList
(
@ApiParam
(
"商家id"
)
@RequestParam
Long
mchtId
)
{
MchtShopInfoResult
mchtShopInfoResult
=
mchtShopInfoService
.
getMchtShopInfo
(
mchtId
);
return
CommonResult
.
success
(
mchtShopInfoResult
);
}
@ApiOperation
(
"找货必看"
)
@RequestMapping
(
value
=
"/api/z/mchtShop/getGoodStuffList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
ShopStallResult
>>
getGoodStuffList
(
@ModelAttribute
ShopQueryVo
stallQueryVo
)
{
List
<
ShopStallResult
>
shopStallResults
=
mchtShopInfoService
.
getGoodStuffList
(
stallQueryVo
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
shopStallResults
));
}
@ApiOperation
(
"获取商家基础信息"
)
@RequestMapping
(
value
=
"/api/z/mchtShop/getMchtBaseInfo"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
MchtBaseInfoResult
>
getMchtBaseInfo
(
@ApiParam
(
"商家id"
)
@RequestParam
Long
mchtId
)
{
MchtBaseInfoResult
mchtShopInfoResult
=
mchtShopInfoService
.
getMchtBaseInfo
(
mchtId
);
return
CommonResult
.
success
(
mchtShopInfoResult
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/MemberReadHistoryController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.portal.domain.MemberReadHistoryResult
;
import
com.macro.mall.portal.service.MemberReadHistoryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.List
;
/**
* 会员商品浏览记录管理Controller
* Created by macro on 2018/8/3.
*/
@Controller
@Api
(
tags
=
"会员商品浏览记录管理"
,
description
=
"会员商品浏览记录管理"
)
@RequestMapping
(
"/api/y/member/readHistory"
)
public
class
MemberReadHistoryController
{
@Autowired
private
MemberReadHistoryService
memberReadHistoryService
;
@ApiOperation
(
"创建浏览记录"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@ApiParam
(
"会员id"
)
@RequestParam
Long
memberId
,
@ApiParam
(
"id"
)
@RequestParam
Long
id
,
@ApiParam
(
"浏览类型 1商品 2商家"
)
@RequestParam
Integer
type
)
{
int
count
=
memberReadHistoryService
.
create
(
id
,
type
,
memberId
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"删除浏览记录"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@ApiParam
(
"主键id,多个以逗号隔开"
)
@RequestParam
String
ids
)
{
int
count
=
memberReadHistoryService
.
delete
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"展示浏览记录"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
MemberReadHistoryResult
>>
list
(
@ApiParam
(
"类型 1商品 2商家"
)
@RequestParam
Integer
type
)
{
List
<
MemberReadHistoryResult
>
memberReadHistoryList
=
memberReadHistoryService
.
list
(
type
);
return
CommonResult
.
success
(
memberReadHistoryList
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/OmsComplaintApplicationController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.OmsComplaintApplication
;
import
com.macro.mall.model.OmsComplaintType
;
import
com.macro.mall.portal.domain.OmsComplaintApplicationAdd
;
import
com.macro.mall.portal.domain.Vo.OmsOrderSonVo
;
import
com.macro.mall.portal.service.OmsComplaintApplicationService
;
import
com.macro.mall.portal.service.OmsComplaintTypeService
;
import
com.macro.mall.portal.service.order.OmsOrderSonService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @author yupengcheng
* @ClasssName OmsComplaintApplicationController
* @Description
* @Date 2020/3/2 17:07
*/
@Controller
@Api
(
tags
=
"会员投诉管理"
,
description
=
"会员投诉管理"
)
@RequestMapping
(
"/complaint"
)
public
class
OmsComplaintApplicationController
{
@Autowired
private
OmsOrderSonService
orderSonService
;
@Autowired
private
OmsComplaintTypeService
complaintTypeService
;
@Autowired
private
OmsComplaintApplicationService
complaintApplicationService
;
/**
* 可申请交易纠纷订单
*/
@ApiOperation
(
"可申请交易纠纷订单"
)
@RequestMapping
(
value
=
"/pageOmsOrderList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
OmsOrderSonVo
>>
pageOmsOrderList
(
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
OmsOrderSonVo
>
list
=
orderSonService
.
getListByComplaint
(
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
/**
* 交易纠纷申请
*/
@ApiOperation
(
"交易纠纷申请"
)
@RequestMapping
(
value
=
"/application"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
application
(
@RequestBody
OmsComplaintApplicationAdd
complaintApplicationAdd
){
return
complaintApplicationService
.
add
(
complaintApplicationAdd
);
}
/**
* 获取投诉类型
*/
@ApiOperation
(
"获取投诉类型"
)
@RequestMapping
(
value
=
"/getComplaintTypeList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
OmsComplaintType
>>
getComplaintTypeList
(){
List
<
OmsComplaintType
>
list
=
complaintTypeService
.
getList
();
return
CommonResult
.
success
(
list
);
}
/**
* 已申请投诉列表
*/
@ApiOperation
(
"已申请投诉列表"
)
@RequestMapping
(
value
=
"/getList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
OmsComplaintApplication
>>
getList
(
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
OmsComplaintApplication
>
list
=
complaintApplicationService
.
getList
(
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
/**
* 投诉单详情
*/
@ApiOperation
(
"投诉单详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
OmsComplaintApplication
>
detail
(
@RequestParam
Long
id
){
OmsComplaintApplication
detail
=
complaintApplicationService
.
detail
(
id
);
return
CommonResult
.
success
(
detail
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/OmsPortalOrderReturnApplyController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.order.OmsOrderReturnApplyParam
;
import
com.macro.mall.portal.service.OmsPortalOrderReturnApplyService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
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.ResponseBody
;
/**
* 申请退货管理Controller
* Created by macro on 2018/10/17.
*/
@Controller
@Api
(
tags
=
"申请退货管理"
,
description
=
"申请退货管理"
)
@RequestMapping
(
"/returnApply"
)
public
class
OmsPortalOrderReturnApplyController
{
@Autowired
private
OmsPortalOrderReturnApplyService
returnApplyService
;
@ApiOperation
(
"申请退货"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
OmsOrderReturnApplyParam
returnApply
)
{
int
count
=
returnApplyService
.
create
(
returnApply
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/OmsPortalOrderReturnReasonController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.OmsOrderReturnReason
;
import
com.macro.mall.portal.service.OmsPortalOrderReturnReasonService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 退货原因管理Controller
* Created by macro on 2018/10/17.
*/
@Controller
@Api
(
tags
=
"退货原因管理"
,
description
=
"退货原因管理"
)
@RequestMapping
(
"/api/z"
)
public
class
OmsPortalOrderReturnReasonController
{
@Resource
private
OmsPortalOrderReturnReasonService
orderReturnReasonService
;
@ApiOperation
(
"全部退货原因"
)
@RequestMapping
(
value
=
"/list/all"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
OmsOrderReturnReason
>>
listAll
()
{
List
<
OmsOrderReturnReason
>
reasonList
=
orderReturnReasonService
.
list
();
return
CommonResult
.
success
(
CommonPage
.
restPage
(
reasonList
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/PmsAreaController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsArea
;
import
com.macro.mall.service.system.PmsAreaService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 区域三级联动
*/
@Controller
@Api
(
tags
=
"区域三级联动管理"
,
description
=
"区域三级联动管理"
)
public
class
PmsAreaController
{
@Resource
private
PmsAreaService
pmsAreaService
;
@ApiOperation
(
value
=
"省市区三级联动"
)
@RequestMapping
(
value
=
"/api/z/area/getArea"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
PmsArea
>>
getArea
(
@ApiParam
(
"父级id"
)
@RequestParam
Long
parentId
)
{
return
CommonResult
.
success
(
pmsAreaService
.
getArea
(
parentId
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/PmsAttributeController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.vo.product.AttributeStyleResult
;
import
com.macro.mall.service.product.PmsProductAttributeValueService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 属性
* @author chenwf
* @date 2020/2/25
*/
@Controller
@Api
(
tags
=
"属性相关接口"
,
description
=
"属性相关接口"
)
public
class
PmsAttributeController
{
@Resource
private
PmsProductAttributeValueService
pmsProductAttributeValueService
;
@ApiOperation
(
"获取类目属性列表(ex:风格)"
)
@RequestMapping
(
value
=
"/api/z/attribute/getStyleList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
AttributeStyleResult
>>
getStyleList
(
@ApiParam
(
"平台类目id"
)
@RequestParam
(
required
=
false
)
Long
categoryId
)
{
List
<
AttributeStyleResult
>
attributeResults
=
pmsProductAttributeValueService
.
getStyleList
(
categoryId
);
return
CommonResult
.
success
(
attributeResults
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/PmsCategoryController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.portal.domain.CategoryCommonResult
;
import
com.macro.mall.portal.service.PmsProductCategoryService
;
import
com.macro.mall.portal.service.ProductMchtCategoryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 类目
* @author chenwf
* @date 2020/2/25
*/
@Controller
@Api
(
tags
=
"类目相关接口"
,
description
=
"类目相关接口"
)
public
class
PmsCategoryController
{
@Resource
private
ProductMchtCategoryService
productMchtCategoryService
;
@Resource
private
PmsProductCategoryService
pmsProductCategoryService
;
@ApiOperation
(
"获取商家自有类目列表,级别类目不存在,则取平台的级别类目"
)
@RequestMapping
(
value
=
"/api/z/category/getMchtCategoryList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
CategoryCommonResult
>>
getMchtCategoryList
(
@ApiParam
(
"级别1一级类目 2二级类目 3三级类目"
)
@RequestParam
(
required
=
false
)
Integer
level
,
@ApiParam
(
"商家类目id"
)
@RequestParam
(
required
=
false
)
Long
id
,
@ApiParam
(
"商家id"
)
@RequestParam
Long
mchtId
)
{
List
<
CategoryCommonResult
>
categoryCommonResults
=
productMchtCategoryService
.
getMchtCategoryList
(
level
,
id
,
mchtId
);
return
CommonResult
.
success
(
categoryCommonResults
);
}
@ApiOperation
(
"获取平台类目"
)
@RequestMapping
(
value
=
"/api/z/category/getCategoryList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
CategoryCommonResult
>>
getCategoryList
(
@ApiParam
(
"级别1一级类目 2二级类目 3三级类目"
)
@RequestParam
(
required
=
false
)
Integer
level
,
@ApiParam
(
"平台类目id"
)
@RequestParam
(
required
=
false
)
Long
id
,
@ApiParam
(
"关键字"
)
@RequestParam
(
required
=
false
)
String
keywords
)
{
List
<
CategoryCommonResult
>
categoryCommonResults
=
pmsProductCategoryService
.
getPlatCategoryList
(
level
,
id
,
keywords
);
return
CommonResult
.
success
(
categoryCommonResults
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/PmsCommodityReportController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsCommodityReport
;
import
com.macro.mall.model.UmsReportTheme
;
import
com.macro.mall.model.UmsReportType
;
import
com.macro.mall.portal.domain.PmsCommodityReportParam
;
import
com.macro.mall.portal.service.PmsCommodityReportService
;
import
com.macro.mall.portal.service.UmsReportThemeService
;
import
com.macro.mall.portal.service.UmsReportTypeService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @author yupengcheng
* @ClasssName PmsCommodityReportController
* @Description
* @Date 2020/3/30 9:46
*/
@Controller
@Api
(
tags
=
"商品举报"
,
description
=
"商品举报"
)
@RequestMapping
(
"/report"
)
public
class
PmsCommodityReportController
{
@Autowired
private
PmsCommodityReportService
pmsCommodityReportService
;
@Autowired
private
UmsReportTypeService
umsReportTypeService
;
@Autowired
private
UmsReportThemeService
umsReportThemeService
;
/**
* 添加商品举报
*/
@ApiOperation
(
"添加商品举报申请"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
add
(
@RequestBody
PmsCommodityReportParam
commodityReportParam
){
return
pmsCommodityReportService
.
add
(
commodityReportParam
);
}
/**
* 举报类型
*/
@ApiOperation
(
"举报类型"
)
@RequestMapping
(
value
=
"/getType"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
UmsReportType
>>
getType
(){
List
<
UmsReportType
>
list
=
umsReportTypeService
.
getList
();
return
CommonResult
.
success
(
list
);
}
/**
* 举报主题
*/
@ApiOperation
(
"举报主题"
)
@RequestMapping
(
value
=
"/getTheme"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"typeId"
,
value
=
"举报类型id"
,
required
=
true
,
dataType
=
"Long"
,
paramType
=
"query"
)
})
public
CommonResult
<
List
<
UmsReportTheme
>>
getTheme
(
Long
typeId
){
List
<
UmsReportTheme
>
list
=
umsReportThemeService
.
getList
(
typeId
);
return
CommonResult
.
success
(
list
);
}
/**
* 举报分页展示
*/
@ApiOperation
(
"举报分页展示"
)
@RequestMapping
(
value
=
"/quperPageList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsCommodityReport
>>
quperPageList
(
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsCommodityReport
>
list
=
pmsCommodityReportService
.
queryPageList
(
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
/**
* 撤销/删除
*/
@ApiOperation
(
"撤销/删除"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"举报id"
,
required
=
true
,
dataType
=
"Long"
,
paramType
=
"query"
)
})
public
CommonResult
delete
(
Long
id
){
return
pmsCommodityReportService
.
delete
(
id
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/PmsProductController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.MchtProductQueryParam
;
import
com.macro.mall.domain.dto.product.ProductDetailDto
;
import
com.macro.mall.domain.vo.MchtProductResult
;
import
com.macro.mall.model.PmsComment
;
import
com.macro.mall.model.UmsMember
;
import
com.macro.mall.portal.domain.CommentResult
;
import
com.macro.mall.domain.vo.order.ProductTransactionRecordDto
;
import
com.macro.mall.portal.domain.Vo.ProductCandRVo
;
import
com.macro.mall.portal.domain.Vo.ProductItemResult
;
import
com.macro.mall.portal.service.PmsCommentService
;
import
com.macro.mall.portal.service.ProductItemService
;
import
com.macro.mall.service.order.OmsPortalOrderService
;
import
com.macro.mall.service.member.UmsMemberService
;
import
com.macro.mall.service.product.PmsProductService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
* @author chenwf
* @date 2020/2/20
*/
@Controller
@Api
(
tags
=
"商品接口"
,
description
=
"商品接口"
)
public
class
PmsProductController
{
@Resource
private
PmsProductService
pmsProductService
;
@Resource
private
ProductItemService
productItemService
;
@Resource
private
PmsCommentService
pmsCommentService
;
@Resource
private
OmsPortalOrderService
omsPortalOrderService
;
@Resource
private
UmsMemberService
memberService
;
@ApiOperation
(
"商品详情"
)
@RequestMapping
(
value
=
"/api/z/product/getProductDetail"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
ProductDetailDto
>
getProductDetail
(
@ApiParam
(
"商品id"
)
@RequestParam
Long
productId
,
@ApiParam
(
"会员id"
)
@RequestParam
(
required
=
false
)
Long
memberId
,
HttpServletRequest
request
)
{
return
pmsProductService
.
getProductDetail
(
productId
,
memberId
,
request
);
}
@ApiOperation
(
"获取商品规格"
)
@RequestMapping
(
value
=
"/api/z/product/getProductItems"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
ProductItemResult
>
getProductItems
(
@ApiParam
(
"商品id"
)
@RequestParam
Long
productId
)
{
ProductItemResult
productSkuResult
=
productItemService
.
getProductSkuItems
(
productId
);
return
CommonResult
.
success
(
productSkuResult
);
}
@ApiOperation
(
"获取商品评价列表"
)
@RequestMapping
(
value
=
"/api/z/product/getProductComments"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsComment
>>
getProductComments
(
@ApiParam
(
"商品id"
)
@RequestParam
Long
productId
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsComment
>
pmsComments
=
pmsCommentService
.
getProductComments
(
productId
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
pmsComments
));
}
@ApiOperation
(
"获取我的评价列表"
)
@RequestMapping
(
value
=
"/product/member/comments"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
CommentResult
>>
queryMemberProductComments
(
@ApiParam
(
"评论时间ex:2020-03-04"
)
@RequestParam
String
dateStr
,
@ApiParam
(
"商家名称"
)
@RequestParam
String
mchtName
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
UmsMember
currentMember
=
memberService
.
getCurrentMember
();
List
<
CommentResult
>
pmsComments
=
pmsCommentService
.
getProductCommentsByMemberId
(
currentMember
.
getId
(),
pageSize
,
pageNum
,
dateStr
,
mchtName
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
pmsComments
));
}
@ApiOperation
(
"获取商品订单成交记录"
)
@RequestMapping
(
value
=
"/api/z/product/getProductTranRecord"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
ProductTransactionRecordDto
>>
getProductTranRecord
(
@ApiParam
(
"商品id"
)
@RequestParam
Long
productId
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
ProductTransactionRecordDto
>
productTranRecords
=
omsPortalOrderService
.
getProductTranRecord
(
productId
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
productTranRecords
));
}
@ApiOperation
(
"商品热销/商品热卖"
)
@RequestMapping
(
value
=
"/api/z/product/getMchtHotProducts"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
MchtProductResult
>>
getMchtHotProducts
(
@ModelAttribute
MchtProductQueryParam
productQueryParam
)
{
List
<
MchtProductResult
>
mchtProductList
=
pmsProductService
.
getMchtProductList
(
productQueryParam
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
mchtProductList
));
}
@ApiOperation
(
"猜你喜欢(根据商品的关键字)"
)
@RequestMapping
(
value
=
"/api/z/product/getGueesProduct"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
MchtProductResult
>>
getGueesProduct
(
@ApiParam
(
"商品id"
)
@RequestParam
(
required
=
false
)
Long
productId
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
MchtProductResult
>
mchtProductList
=
pmsProductService
.
getGueesProduct
(
productId
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
mchtProductList
));
}
@ApiOperation
(
"购买该商品的会员还购买的商品列表"
)
@RequestMapping
(
value
=
"/api/z/product/getMemberProducts"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
MchtProductResult
>>
getMemberProducts
(
@ApiParam
(
"商品id"
)
@RequestParam
Long
productId
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
MchtProductResult
>
mchtProductList
=
pmsProductService
.
getMemberProducts
(
productId
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
mchtProductList
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/SearchController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.MchtProductQueryParam
;
import
com.macro.mall.domain.dto.mcht.ShopQueryVo
;
import
com.macro.mall.domain.vo.MchtProductResult
;
import
com.macro.mall.domain.vo.mcht.ShopStallResult
;
import
com.macro.mall.security.util.AddressUtils
;
import
com.macro.mall.service.mcht.MchtShopInfoService
;
import
com.macro.mall.service.member.UmsMemberService
;
import
com.macro.mall.service.platform.PmsSearchWordService
;
import
com.macro.mall.service.product.PmsProductService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
* 搜索商品|供应商
*
* @author chenwf
* @date 2020/2/28
*/
@Controller
@Api
(
tags
=
"搜索商品|供应商相关接口"
,
description
=
"搜索商品|供应商相关接口"
)
public
class
SearchController
{
@Resource
private
PmsProductService
pmsProductService
;
@Resource
private
MchtShopInfoService
mchtShopInfoService
;
@Resource
private
PmsSearchWordService
searchWordService
;
@Resource
private
UmsMemberService
memberService
;
@ApiOperation
(
"商品搜索结果"
)
@RequestMapping
(
value
=
"/api/z/product/getProductSerchResult"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
MchtProductResult
>>
getProductSerchResult
(
@ModelAttribute
MchtProductQueryParam
productQueryParam
,
@ApiIgnore
HttpServletRequest
request
)
{
List
<
MchtProductResult
>
mchtProductList
=
pmsProductService
.
getMchtProductList
(
productQueryParam
);
String
ip
=
AddressUtils
.
getIPAddress
(
request
);
Long
memberId
=
memberService
.
getCurrentMemberId
();
//添加检索记录
searchWordService
.
setWordConfig
(
productQueryParam
.
getKeywords
(),
ip
,
memberId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
mchtProductList
));
}
@ApiOperation
(
"供应商搜索结果"
)
@RequestMapping
(
value
=
"/api/z/getMchtSerchResult"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
ShopStallResult
>>
getMchtSerchResult
(
@ModelAttribute
ShopQueryVo
shopQueryVo
)
{
List
<
ShopStallResult
>
shopStallResults
=
mchtShopInfoService
.
getGoodStuffList
(
shopQueryVo
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
shopStallResults
));
}
@ApiOperation
(
value
=
"以图搜图"
)
@RequestMapping
(
value
=
"/api/z/getMchtProductListById"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
MchtProductResult
>>
getMchtProductListById
(
@RequestBody
MchtProductQueryParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
MchtProductResult
>
results
=
pmsProductService
.
getMchtProductListById
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
@ApiOperation
(
value
=
"获取相似商品id"
)
@RequestMapping
(
value
=
"/api/z/getLikeId"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
Long
>>
getLikeId
(
@ApiParam
(
"图片路径"
)
@RequestParam
String
url
)
{
List
<
Long
>
ids
=
pmsProductService
.
getLikeId
(
url
);
return
CommonResult
.
success
(
ids
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/SmsController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.domain.SmsResult
;
import
com.macro.mall.domain.vo.SmsVo
;
import
com.macro.mall.service.common.CommonService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
/** 短信发送
* @author chenwf
* @date 2020/2/27
*/
@Controller
@Api
(
tags
=
"短信"
,
description
=
"短信"
)
@Slf4j
public
class
SmsController
{
@Resource
private
CommonService
commonService
;
@ApiOperation
(
"短信发送"
)
@RequestMapping
(
value
=
"/api/z/sms/sendSms"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
SmsResult
sendSms
(
@ModelAttribute
SmsVo
smsVo
)
{
return
commonService
.
sendSms
(
smsVo
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/StallController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsStallArea
;
import
com.macro.mall.model.PmsStallPositionManage
;
import
com.macro.mall.domain.vo.mcht.ShopStallResult
;
import
com.macro.mall.domain.dto.mcht.ShopStallQueryVo
;
import
com.macro.mall.portal.service.PmsStallPositionManageService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @author chenwf
* @date 2020/2/25
*/
@Controller
@Api
(
tags
=
"档口相关接口"
,
description
=
"档口相关接口"
)
public
class
StallController
{
@Resource
private
PmsStallPositionManageService
pmsStallPositionManageService
;
@ApiOperation
(
"档口市场商家列表"
)
@RequestMapping
(
value
=
"/api/z/stall/getStallMchtShopList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
ShopStallResult
>>
getStallMchtShopList
(
@ModelAttribute
ShopStallQueryVo
stallQueryVo
)
{
List
<
ShopStallResult
>
shopStallResults
=
pmsStallPositionManageService
.
getStallMchtShopList
(
stallQueryVo
,
true
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
shopStallResults
));
}
@ApiOperation
(
"档口筛选列表"
)
@RequestMapping
(
value
=
"/api/z/stall/getProvinceStallList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
PmsStallPositionManage
>>
getProvinceStallList
(
@ApiParam
(
"省id"
)
@RequestParam
Long
provinceId
,
@ApiParam
(
"页码"
)
@RequestParam
Integer
pageNum
,
@ApiParam
(
"页数"
)
@RequestParam
Integer
pageSize
)
{
List
<
PmsStallPositionManage
>
stalls
=
pmsStallPositionManageService
.
getProvinceStallList
(
provinceId
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
stalls
);
}
@ApiOperation
(
"档口区域筛选列表"
)
@RequestMapping
(
value
=
"/api/z/stall/getStallAreaList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
PmsStallArea
>>
getStallAreaList
(
@ApiParam
(
"档口id"
)
@RequestParam
Long
stallId
)
{
List
<
PmsStallArea
>
stallAreas
=
pmsStallPositionManageService
.
getStallAreaList
(
stallId
);
return
CommonResult
.
success
(
stallAreas
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/UmsActivityTrainingController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.UmsActivityTraining
;
import
com.macro.mall.model.UmsEventRegistration
;
import
com.macro.mall.portal.domain.UmsEventRegistrationParam
;
import
com.macro.mall.portal.service.UmsActivityTrainingService
;
import
com.macro.mall.portal.service.UmsEventRegistrationService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @author yupengcheng
* @ClasssName UmsActivityTrainingController
* @Description
* @Date 2020/3/28 14:32
*/
@Controller
@Api
(
tags
=
"活动培训"
,
description
=
"活动培训"
)
@RequestMapping
(
"/activity"
)
public
class
UmsActivityTrainingController
{
@Autowired
private
UmsActivityTrainingService
umsActivityTrainingService
;
@Autowired
private
UmsEventRegistrationService
umsEventRegistrationService
;
/**
* 分页查询活动培训管理列表
*/
@ApiOperation
(
value
=
"分页查询活动培训管理列表"
)
@RequestMapping
(
value
=
"/queryPageList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
UmsActivityTraining
>>
queryPageList
(
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
UmsActivityTraining
>
list
=
umsActivityTrainingService
.
queryPageList
(
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
/**
* 活动培训详情
*/
@ApiOperation
(
value
=
"活动培训详情"
)
@RequestMapping
(
value
=
"/details"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
UmsActivityTraining
>
details
(
@RequestParam
Long
id
){
UmsActivityTraining
activityTraining
=
umsActivityTrainingService
.
details
(
id
);
return
CommonResult
.
success
(
activityTraining
);
}
/**
* 活动报名
*/
@ApiOperation
(
value
=
"活动报名"
)
@RequestMapping
(
value
=
"/signup"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
signup
(
@RequestBody
UmsEventRegistrationParam
umsEventRegistrationParam
){
return
umsEventRegistrationService
.
signup
(
umsEventRegistrationParam
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberCollectController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.MchtProductQueryParam
;
import
com.macro.mall.domain.vo.MchtProductResult
;
import
com.macro.mall.domain.vo.ShopCollectResult
;
import
com.macro.mall.portal.service.MemberCollectService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 收藏
* @author chenwf
* @date 2020/2/24
*/
@Controller
@Api
(
tags
=
"会员收藏相关接口"
,
description
=
"会员收藏相关接口"
)
@RequestMapping
(
"/memberCollect"
)
public
class
UmsMemberCollectController
{
@Resource
private
MemberCollectService
memberCollectService
;
@ApiOperation
(
"用户收藏店铺|商品"
)
@RequestMapping
(
value
=
"/collect"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
collect
(
@ApiParam
(
"收藏类型收藏类型 1店铺 2商品"
)
@RequestParam
Integer
type
,
@ApiParam
(
"收藏id,多个以逗号隔开"
)
@RequestParam
String
id
,
@ApiParam
(
"会员id"
)
@RequestParam
Long
memberId
)
{
int
count
=
memberCollectService
.
collect
(
type
,
id
,
memberId
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"店铺收藏列表"
)
@RequestMapping
(
value
=
"/shopCollectList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
ShopCollectResult
>>
shopCollectList
(
@RequestBody
MchtProductQueryParam
shopCollectQuery
)
{
List
<
ShopCollectResult
>
shopCollectResults
=
memberCollectService
.
shopCollectList
(
shopCollectQuery
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
shopCollectResults
));
}
@ApiOperation
(
"商品收藏列表"
)
@RequestMapping
(
value
=
"/productCollectList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
MchtProductResult
>>
productCollectList
(
@RequestBody
MchtProductQueryParam
mchtProductQueryParam
)
{
List
<
MchtProductResult
>
productResults
=
memberCollectService
.
productCollectList
(
mchtProductQueryParam
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
productResults
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/UmsMemberReceiveAddressController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.UmsMemberReceiveAddress
;
import
com.macro.mall.service.member.UmsMemberReceiveAddressService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* 会员收货地址管理Controller
* Created by macro on 2018/8/28.
*/
@Controller
@Api
(
tags
=
"会员收货地址管理"
,
description
=
"会员收货地址管理"
)
@RequestMapping
(
"/member/address"
)
public
class
UmsMemberReceiveAddressController
{
@Autowired
private
UmsMemberReceiveAddressService
memberReceiveAddressService
;
@ApiOperation
(
"添加收货地址"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
add
(
@RequestBody
UmsMemberReceiveAddress
address
)
{
int
count
=
memberReceiveAddressService
.
add
(
address
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"删除收货地址"
)
@RequestMapping
(
value
=
"/delete/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@PathVariable
Long
id
)
{
int
count
=
memberReceiveAddressService
.
delete
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"修改收货地址"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@PathVariable
Long
id
,
@RequestBody
UmsMemberReceiveAddress
address
)
{
int
count
=
memberReceiveAddressService
.
update
(
id
,
address
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"显示所有收货地址"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
UmsMemberReceiveAddress
>>
list
()
{
List
<
UmsMemberReceiveAddress
>
addressList
=
memberReceiveAddressService
.
list
();
return
CommonResult
.
success
(
addressList
);
}
@ApiOperation
(
"根据地址id查询地址信息"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
UmsMemberReceiveAddress
>
getItem
(
@PathVariable
Long
id
)
{
UmsMemberReceiveAddress
address
=
memberReceiveAddressService
.
getItem
(
id
);
return
CommonResult
.
success
(
address
);
}
@ApiOperation
(
"根据地址id设置默认地址"
)
@RequestMapping
(
value
=
"/setDefault/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
setDefault
(
@PathVariable
Long
id
)
{
int
i
=
memberReceiveAddressService
.
setDefault
(
id
);
if
(
i
>
0
)
{
return
CommonResult
.
success
(
i
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
value
=
"获取用户临时地址"
)
@RequestMapping
(
value
=
"/temporary"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
UmsMemberReceiveAddress
>
getTemporaryAddress
(
@RequestParam
Long
memberId
){
UmsMemberReceiveAddress
address
=
memberReceiveAddressService
.
getTemporaryAddress
(
memberId
);
return
CommonResult
.
success
(
address
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/UmsWithdrawalReviewController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.UmsPaymentMethodParam
;
import
com.macro.mall.domain.dto.UmsWithdrawalReviewAddParam
;
import
com.macro.mall.domain.dto.UmsWithdrawalReviewParam
;
import
com.macro.mall.model.UmsWithdrawalAmount
;
import
com.macro.mall.model.UmsWithdrawalReview
;
import
com.macro.mall.portal.service.UmsWithdrawalAmountService
;
import
com.macro.mall.service.mcht.UmsWithdrawalReviewService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* @author yupengcheng
* @ClasssName UmsWithdrawalReviewController
* @Description
* @Date 2020/2/26 18:28
*/
@Controller
@Api
(
tags
=
"会员提现申请"
,
description
=
"会员提现申请"
)
@RequestMapping
(
"/finance"
)
public
class
UmsWithdrawalReviewController
{
@Resource
private
UmsWithdrawalReviewService
withdrawalReviewService
;
@Autowired
private
UmsWithdrawalAmountService
withdrawalAmountService
;
@ApiOperation
(
"提现申请"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
add
(
@RequestBody
UmsWithdrawalReviewAddParam
withdrawalReview
){
return
withdrawalReviewService
.
addMember
(
withdrawalReview
);
}
@ApiOperation
(
"付款账户信息"
)
@RequestMapping
(
value
=
"/getPayment"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"type"
,
value
=
"支付方式(0 支付宝 ,1微信)"
,
dataType
=
"String"
,
required
=
true
,
paramType
=
"query"
)
})
public
CommonResult
<
UmsPaymentMethodParam
>
getPayment
(
String
type
){
UmsPaymentMethodParam
payment
=
withdrawalReviewService
.
getPayment
(
type
);
return
CommonResult
.
success
(
payment
);
}
@ApiOperation
(
"验证提现金额"
)
@RequestMapping
(
value
=
"/verification"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"amount"
,
value
=
"提现金额"
,
dataType
=
"BigDecimal"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"支付方式(0 支付宝 ,1微信)"
,
dataType
=
"String"
,
required
=
true
,
paramType
=
"query"
)
})
public
CommonResult
verification
(
BigDecimal
amount
,
String
type
){
return
withdrawalReviewService
.
verificationMember
(
amount
,
type
);
}
@ApiOperation
(
"提现申请分页列表"
)
@RequestMapping
(
value
=
"/selectList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
UmsWithdrawalReview
>>
list
(
UmsWithdrawalReviewParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
UmsWithdrawalReview
>
list
=
withdrawalReviewService
.
selectListMember
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
/**
* 获取提现手续费
*/
@ApiOperation
(
"获取提现手续费"
)
@RequestMapping
(
value
=
"/getHandlingFee"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
BigDecimal
>
getHandlingFee
(){
//获取提现金额设置信息
UmsWithdrawalAmount
amount
=
withdrawalAmountService
.
getOne
();
//返回提现手续费
BigDecimal
handlingFee
=
amount
.
getHandlingFee
();
return
CommonResult
.
success
(
handlingFee
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/activity/SmsActivityController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
activity
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.activity.ActivityMchtProductQueryParam
;
import
com.macro.mall.domain.dto.activity.PromotionActivityParam
;
import
com.macro.mall.domain.vo.MchtProductResult
;
import
com.macro.mall.domain.vo.promotion.PromotionActivityVo
;
import
com.macro.mall.model.SmsActivity
;
import
com.macro.mall.service.activity.SmsActivityMchtProductService
;
import
com.macro.mall.service.activity.SmsActivityService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Api
(
tags
=
"平台活动"
)
@RestController
public
class
SmsActivityController
{
@Resource
private
SmsActivityService
activityService
;
@Resource
private
SmsActivityMchtProductService
activityMchtProductService
;
@GetMapping
(
value
=
"activities"
)
@ApiOperation
(
"活动列表"
)
public
CommonResult
<
List
<
SmsActivity
>>
getList
()
{
List
list
=
activityService
.
queryList
(
1
);
return
CommonResult
.
success
(
list
);
}
@GetMapping
(
value
=
"activities/{id}"
)
@ApiOperation
(
"活动详情"
)
public
CommonResult
<
SmsActivity
>
getInfo
(
@PathVariable
Long
id
)
{
SmsActivity
smsActivity
=
activityService
.
getInfo
(
id
);
return
CommonResult
.
success
(
smsActivity
);
}
@ApiOperation
(
"活动商品列表"
)
@GetMapping
(
value
=
"/api/z/activities/products"
)
@ResponseBody
public
CommonResult
<
CommonPage
<
MchtProductResult
>>
getProductSerchResult
(
@ModelAttribute
ActivityMchtProductQueryParam
productQueryParam
)
{
List
<
MchtProductResult
>
mchtProductList
=
activityMchtProductService
.
getMchtProductList
(
productQueryParam
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
mchtProductList
));
}
@ApiOperation
(
"促销活动列表"
)
@GetMapping
(
value
=
"/api/z/promotions"
)
@ResponseBody
public
CommonResult
<
PromotionActivityVo
>
getPromotions
(
@ModelAttribute
PromotionActivityParam
param
)
{
PromotionActivityVo
promotionActivityVo
=
activityMchtProductService
.
getPromotions
(
param
);
return
CommonResult
.
success
(
promotionActivityVo
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/aftersaler/UmsAfterSalesController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
aftersaler
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.OmsOrderItem
;
import
com.macro.mall.model.OmsOrderReturnApply
;
import
com.macro.mall.model.UmsMember
;
import
com.macro.mall.domain.dto.order.OmsOrderItemResult
;
import
com.macro.mall.domain.dto.order.OmsOrderReturnApplyParam
;
import
com.macro.mall.domain.dto.order.OmsOrderReturnParam
;
import
com.macro.mall.domain.vo.order.OmsOrderReturnResult
;
import
com.macro.mall.service.order.UmsAfterSalesApplyService
;
import
com.macro.mall.service.member.UmsMemberService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"售后服务"
,
description
=
"售后服务"
)
@RequestMapping
(
"/after/sales"
)
public
class
UmsAfterSalesController
{
@Resource
private
UmsAfterSalesApplyService
umsAfterSalesApplyService
;
@Resource
private
UmsMemberService
memberService
;
@ApiOperation
(
"获取商品订单"
)
@RequestMapping
(
value
=
"/orderlist"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
OmsOrderItem
>>
getOrderList
(
@RequestParam
Long
memberId
,
@RequestParam
Integer
sDate
,
String
conditions
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
OmsOrderItem
>
omsOrderItems
=
umsAfterSalesApplyService
.
getOrderList
(
memberId
,
sDate
,
conditions
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
omsOrderItems
));
}
@ApiOperation
(
"售后申请"
)
@RequestMapping
(
value
=
"/apply"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
afterSalesApply
(
@RequestBody
OmsOrderReturnApplyParam
omsOrderReturnApplyParam
)
throws
Exception
{
UmsMember
umsMember
=
memberService
.
getCurrentMember
();
Integer
count
=
umsAfterSalesApplyService
.
afterSalesApply
(
omsOrderReturnApplyParam
,
umsMember
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"获取服务单详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"applyId"
,
value
=
"申请单id"
,
required
=
true
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"parentOrderId"
,
value
=
"母订单id"
,
required
=
true
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"类型(1获取取消订单详情)"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"query"
)
})
public
CommonResult
<
OmsOrderReturnResult
>
getDetail
(
@RequestParam
Long
applyId
,
Long
parentOrderId
,
Integer
type
){
OmsOrderReturnResult
omsOrderReturnResult
=
umsAfterSalesApplyService
.
getDetail
(
applyId
,
parentOrderId
,
type
);
return
CommonResult
.
success
(
omsOrderReturnResult
);
}
@ApiOperation
(
"获取退换货记录"
)
@RequestMapping
(
value
=
"/record"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
OmsOrderReturnApply
>>
getOrderReturnRecord
(
@ModelAttribute
OmsOrderReturnParam
omsOrderReturnParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
UmsMember
umsMember
=
memberService
.
getCurrentMember
();
omsOrderReturnParam
.
setMemberId
(
umsMember
.
getId
());
List
<
OmsOrderReturnApply
>
orderReturnApplyList
=
umsAfterSalesApplyService
.
getOrderReturnRecord
(
omsOrderReturnParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderReturnApplyList
));
}
@ApiOperation
(
"获取订单商品详情"
)
@RequestMapping
(
value
=
"/item"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
OmsOrderItemResult
>
getOrderItemDetail
(
@RequestParam
Long
orderItemId
){
OmsOrderItemResult
omsOrderItemResult
=
umsAfterSalesApplyService
.
getOrderItemDetail
(
orderItemId
);
return
CommonResult
.
success
(
omsOrderItemResult
);
}
@ApiOperation
(
"取消售后单"
)
@RequestMapping
(
value
=
"/cancel"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
cancelApply
(
@RequestParam
Long
applyId
)
throws
Exception
{
Integer
count
=
umsAfterSalesApplyService
.
cancelApply
(
applyId
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"编辑申请单"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateApply
(
@RequestBody
OmsOrderReturnApply
apply
){
Integer
count
=
umsAfterSalesApplyService
.
updateApply
(
apply
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/article/CmsArticleController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
article
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.CmsArticle
;
import
com.macro.mall.portal.domain.CmsArticleDetailResult
;
import
com.macro.mall.portal.domain.CmsArticleResult
;
import
com.macro.mall.portal.service.article.CmsArticleService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"文章"
,
description
=
"文章"
)
@RequestMapping
(
value
=
"/article"
)
public
class
CmsArticleController
{
@Resource
private
CmsArticleService
cmsArticleService
;
@ApiOperation
(
value
=
"根据一级分类id获取文章列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
CmsArticleResult
>>
getArticleList
(
@RequestParam
Long
classityId
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
CmsArticleResult
>
results
=
cmsArticleService
.
getArticleList
(
classityId
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
@ApiOperation
(
value
=
"获取文章详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CmsArticleDetailResult
>
getArticleDetail
(
@RequestParam
Long
articleId
,
Long
memberId
){
CmsArticleDetailResult
article
=
cmsArticleService
.
getArticleDetial
(
articleId
,
memberId
);
return
CommonResult
.
success
(
article
);
}
@ApiOperation
(
value
=
"获取文章列表"
)
@RequestMapping
(
value
=
"/articlelist"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
CmsArticle
>>
getArticleListById
(
@RequestParam
Long
classityId
,
@ApiParam
(
"查询类型(1一级2二级)"
)
@RequestParam
Integer
type
,
@ApiParam
(
"热门资讯"
)
Integer
hot
,
@ApiParam
(
"关键词"
)
String
keyWords
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
CmsArticle
>
articleList
=
cmsArticleService
.
getArticleListById
(
classityId
,
type
,
hot
,
keyWords
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
articleList
));
}
@ApiOperation
(
value
=
"文章点赞"
)
@RequestMapping
(
value
=
"/like"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
articleLike
(
@ApiParam
(
"用户id"
)
@RequestParam
Long
memberId
,
@ApiParam
(
"文章id"
)
@RequestParam
Long
articleId
){
Integer
count
=
cmsArticleService
.
articleLike
(
memberId
,
articleId
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/coupon/SmsCouponController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
coupon
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.marketing.SmsCouponListParam
;
import
com.macro.mall.domain.vo.coupon.SmsCouponVo
;
import
com.macro.mall.model.UmsMember
;
import
com.macro.mall.service.coupon.SmsCouponService
;
import
com.macro.mall.service.member.UmsMemberService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 优惠券管理Controller
* Created by macro on 2018/8/28.
*/
@Controller
@Api
(
tags
=
"优惠券"
)
@RequestMapping
public
class
SmsCouponController
{
@Resource
private
SmsCouponService
couponService
;
@Resource
private
UmsMemberService
memberService
;
@ApiOperation
(
"优惠券列表"
)
@GetMapping
(
value
=
"/api/z/coupons"
)
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsCouponVo
>>
list
(
@ModelAttribute
SmsCouponListParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
UmsMember
member
=
memberService
.
getCurrentMember
();
List
<
SmsCouponVo
>
couponList
=
couponService
.
listAndHistory
(
param
,
member
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
couponList
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/coupon/UmsMemberCouponController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
coupon
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.coupon.SmsCouponHistoryParam
;
import
com.macro.mall.domain.vo.coupon.SmsCouponVo
;
import
com.macro.mall.model.SmsCouponHistory
;
import
com.macro.mall.domain.dto.order.CartPromotionItem
;
import
com.macro.mall.domain.vo.coupon.SmsCouponHistoryDetail
;
import
com.macro.mall.service.order.OmsCartItemService
;
import
com.macro.mall.service.coupon.UmsMemberCouponService
;
import
com.macro.mall.service.member.UmsMemberService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* 用户优惠券管理Controller
* Created by macro on 2018/8/29.
*/
@RestController
@Api
(
tags
=
"用户优惠券管理"
)
@RequestMapping
(
"/member/coupon"
)
public
class
UmsMemberCouponController
{
@Autowired
private
UmsMemberCouponService
memberCouponService
;
@Autowired
private
OmsCartItemService
cartItemService
;
@Autowired
private
UmsMemberService
memberService
;
@ApiOperation
(
"领取指定优惠券"
)
@RequestMapping
(
value
=
"/add/{couponId}"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
add
(
@PathVariable
Long
couponId
)
{
return
memberCouponService
.
add
(
couponId
);
}
@ApiOperation
(
"删除指定优惠券"
)
@DeleteMapping
(
value
=
"{couponId}"
)
public
CommonResult
delete
(
@PathVariable
Long
couponId
)
{
return
memberCouponService
.
delete
(
couponId
);
}
@ApiOperation
(
"获取用户优惠券列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
SmsCouponVo
>>
list
(
@ModelAttribute
SmsCouponHistoryParam
param
)
{
List
<
SmsCouponVo
>
couponHistoryList
=
memberCouponService
.
list
(
param
);
return
CommonResult
.
success
(
couponHistoryList
);
}
/* @ApiOperation("获取登录会员购物车的相关优惠券")
@ApiImplicitParam(name = "type", value = "使用可用:0->不可用;1->可用",
defaultValue = "1", allowableValues = "0,1", paramType = "query", dataType = "integer")
@RequestMapping(value = "/list/cart/{type}", method = RequestMethod.GET)
public CommonResult<List<SmsCouponHistoryDetail>> listCart(@PathVariable Integer type) {
List<CartPromotionItem> cartPromotionItemList = cartItemService.listPromotion(memberService.getCurrentMember().getId());
List<SmsCouponHistoryDetail> couponHistoryList = memberCouponService.listCart(cartPromotionItemList, type);
return CommonResult.success(couponHistoryList);
}*/
}
mall-portal/src/main/java/com/macro/mall/portal/controller/customcolumn/CmsCustomColumnController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
customcolumn
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.CmsCustomColumn
;
import
com.macro.mall.service.customcolumn.CmsCustomColumnService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @ClassName CmsCustomColumnController
* @Description TODO
* @Author cxh
* @Date 2020/4/10 13:51
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"自定义栏目管理"
,
description
=
"自定义栏目管理"
)
@RequestMapping
public
class
CmsCustomColumnController
{
@Resource
private
CmsCustomColumnService
cmsCustomColumnService
;
@ApiOperation
(
value
=
"获取栏目列表"
)
@RequestMapping
(
value
=
"/api/z/custom/column/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
CmsCustomColumn
>>
getColumnList
(
Integer
sort
,
Integer
show
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
CmsCustomColumn
>
list
=
cmsCustomColumnService
.
getColumnList
(
sort
,
show
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/distributionmcht/PmsDmchtController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
distributionmcht
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.PmsDmchtApplyHistoryParam
;
import
com.macro.mall.domain.vo.PmsDmchtApplyHistoryVo
;
import
com.macro.mall.model.PmsDmchtApplyHistory
;
import
com.macro.mall.service.distributionmcht.PmsDmchtService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @ClassName PmsDmchtController
* @Description TODO
* @Author cxh
* @Date 2020/4/3 16:03
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"分销商管理"
,
description
=
"分销商管理"
)
@RequestMapping
(
value
=
"/dmcht"
)
public
class
PmsDmchtController
{
@Resource
private
PmsDmchtService
pmsDmchtService
;
@ApiOperation
(
value
=
"分销商申请"
)
@RequestMapping
(
value
=
"/apply"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
apply
(
@RequestBody
PmsDmchtApplyHistory
applyHistory
){
Integer
count
=
pmsDmchtService
.
apply
(
applyHistory
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取分销加盟记录"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsDmchtApplyHistoryVo
>>
getApplyList
(
@ModelAttribute
PmsDmchtApplyHistoryParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsDmchtApplyHistoryVo
>
results
=
pmsDmchtService
.
getApplyList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
@ApiOperation
(
value
=
"操作"
)
@RequestMapping
(
value
=
"/audit"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
audit
(
@RequestParam
Long
applyId
,
@ApiParam
(
"类型(1同意2终止3拒绝)"
)
@RequestParam
Integer
type
){
Integer
count
=
pmsDmchtService
.
audit
(
applyId
,
type
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/feedback/UmsFeedbackController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
feedback
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.CmsFeedback
;
import
com.macro.mall.model.CmsFeedbackClassify
;
import
com.macro.mall.service.feedback.CmsFeedbackClassifyService
;
import
com.macro.mall.service.feedback.CmsFeedbackService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
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
;
/**
* @ClassName UmsFeedbackController
* @Description TODO
* @Author cxh
* @Date 2020/4/8 14:44
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"意见反馈"
,
description
=
"意见反馈"
)
@RequestMapping
(
value
=
"/feedback"
)
public
class
UmsFeedbackController
{
@Resource
private
CmsFeedbackService
cmsFeedbackService
;
@Resource
private
CmsFeedbackClassifyService
cmsFeedbackClassifyService
;
@ApiOperation
(
value
=
"用户意见反馈"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
addFeedback
(
@RequestBody
CmsFeedback
feedback
){
Integer
count
=
cmsFeedbackService
.
addFeedback
(
feedback
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取分类列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
CmsFeedbackClassify
>>
getClassify
(){
List
<
CmsFeedbackClassify
>
classifies
=
cmsFeedbackClassifyService
.
getClassifyList
();
return
CommonResult
.
success
(
classifies
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/hhome/HhomeController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
hhome
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.mcht.ShopSearchParam
;
import
com.macro.mall.domain.vo.mcht.RecommendShopVo
;
import
com.macro.mall.domain.vo.product.RecommendProductVo
;
import
com.macro.mall.portal.domain.Vo.HhomeDate
;
import
com.macro.mall.portal.service.hhome.HhomeService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
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
;
/**
* @ClassName HhomeController
* @Description TODO
* @Author cxh
* @Date 2020/4/24 15:20
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"H5商城端首页"
,
description
=
"H5商城端首页"
)
@RequestMapping
(
value
=
"/api/z/h/home"
)
public
class
HhomeController
{
@Resource
private
HhomeService
hhomeService
;
@ApiOperation
(
value
=
"获取H5首页数据"
)
@RequestMapping
(
value
=
"/data"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
HhomeDate
>
getHomeData
(){
HhomeDate
hhomeDate
=
hhomeService
.
getHhomeDate
();
return
CommonResult
.
success
(
hhomeDate
);
}
@ApiOperation
(
value
=
"获取推荐品牌商品"
)
@RequestMapping
(
value
=
"/recommend/product"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
RecommendProductVo
>>
getRecommendProduct
(){
List
<
RecommendProductVo
>
result
=
hhomeService
.
getRecommendProduct
();
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"推荐店铺/店铺查询"
)
@RequestMapping
(
value
=
"/recommend/shop"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
RecommendShopVo
>>
getRecommendShop
(
@ModelAttribute
ShopSearchParam
param
){
List
<
RecommendShopVo
>
result
=
hhomeService
.
getRecommendShop
(
param
);
return
CommonResult
.
success
(
result
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/hshopsearch/HShopSearchController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
hshopsearch
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.hshopsearch.HShopSearchParam
;
import
com.macro.mall.domain.vo.hshopsearch.HShopsearchVo
;
import
com.macro.mall.service.hshopsearch.HShopSearchService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @ClassName HShopSearchController
* @Description TODO
* @Author cxh
* @Date 2020/4/27 10:58
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"找货必看"
,
description
=
"找货必看"
)
@RequestMapping
(
value
=
"/api/z/h/shop"
)
public
class
HShopSearchController
{
@Resource
private
HShopSearchService
hShopSearchService
;
@ApiOperation
(
value
=
"店铺搜索"
)
@RequestMapping
(
value
=
"/search"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
HShopsearchVo
>>
HShopSearch
(
@ModelAttribute
HShopSearchParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
HShopsearchVo
>
result
=
hShopSearchService
.
HShopSearch
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/integral/IntegralGiftController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
integral
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.SmsIntegralGift
;
import
com.macro.mall.service.integral.SmsIntegralGiftService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"积分商城"
)
@RequestMapping
public
class
IntegralGiftController
{
@Resource
private
SmsIntegralGiftService
integralGiftService
;
@ApiOperation
(
"积分礼品列表"
)
@GetMapping
(
value
=
"/api/z/integral/gifts"
)
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsIntegralGift
>>
getItemList
(
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsIntegralGift
>
giftList
=
integralGiftService
.
list
(
null
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
giftList
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/integral/SysRechargeConfigController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
integral
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.pay.PayOrderParam
;
import
com.macro.mall.domain.vo.integral.SysRechargeConfigVo
;
import
com.macro.mall.domain.vo.pay.PayParamVo
;
import
com.macro.mall.service.integral.SysRechargeConfigService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
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.RestController
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"充值配置"
)
@Slf4j
public
class
SysRechargeConfigController
{
@Resource
private
SysRechargeConfigService
rechargeConfigService
;
@GetMapping
(
value
=
"recharge/config"
)
@ApiOperation
(
"列表"
)
public
CommonResult
<
List
<
SysRechargeConfigVo
>>
queryList
()
{
List
<
SysRechargeConfigVo
>
configList
=
rechargeConfigService
.
queryList
();
return
CommonResult
.
success
(
configList
);
}
@PostMapping
(
value
=
"recharge"
)
@ApiOperation
(
"充值"
)
public
CommonResult
<
PayParamVo
>
recharge
(
@RequestBody
PayOrderParam
param
,
@ApiIgnore
HttpServletRequest
request
)
{
CommonResult
result
;
try
{
String
host
=
request
.
getRemoteAddr
();
String
basePath
=
request
.
getScheme
()
+
"://"
+
request
.
getServerName
()
+
":"
+
request
.
getServerPort
()
+
request
.
getContextPath
();
param
.
setBasePath
(
basePath
);
param
.
setHost
(
host
);
result
=
rechargeConfigService
.
recharge
(
param
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResult
.
failed
(
e
.
getMessage
());
}
return
result
;
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/integral/UmsIntegralController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
integral
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.UmsIntegrationChangeHistory
;
import
com.macro.mall.model.UmsMember
;
import
com.macro.mall.portal.domain.UmsIntegralResult
;
import
com.macro.mall.service.member.UmsMemberService
;
import
com.macro.mall.portal.service.integral.UmsIntegralService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"会员积分"
,
description
=
"会员积分"
)
@RequestMapping
(
"/integral"
)
public
class
UmsIntegralController
{
@Resource
private
UmsIntegralService
umsIntegralService
;
@Resource
private
UmsMemberService
memberService
;
@ApiOperation
(
value
=
"获取积分历史记录"
)
@RequestMapping
(
value
=
"getIntegralList"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
UmsIntegrationChangeHistory
>>
getIntegralList
(
@RequestParam
Integer
orderBy
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
UmsMember
umsMember
=
memberService
.
getCurrentMember
();
List
<
UmsIntegrationChangeHistory
>
histories
=
umsIntegralService
.
getHistoryList
(
umsMember
,
orderBy
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
histories
));
}
@ApiOperation
(
"用户积分管理"
)
@RequestMapping
(
value
=
"getIntegral"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
UmsIntegralResult
>
getIntegral
(){
UmsMember
umsMember
=
memberService
.
getCurrentMember
();
UmsIntegralResult
integralResult
=
umsIntegralService
.
getIntegral
(
umsMember
);
return
CommonResult
.
success
(
integralResult
);
}
@ApiOperation
(
value
=
"添加积分测试"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
addIntegralTest
(
@RequestBody
UmsIntegrationChangeHistory
changeHistory
){
UmsMember
umsMember
=
memberService
.
getCurrentMember
();
Integer
count
=
umsIntegralService
.
addIntegral
(
umsMember
,
changeHistory
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"积分消费测试"
)
@RequestMapping
(
value
=
"/consume"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
consumeIntegralTest
(
@RequestBody
UmsIntegrationChangeHistory
changeHistory
){
UmsMember
umsMember
=
memberService
.
getCurrentMember
();
Integer
count
=
umsIntegralService
.
consumeIntegral
(
umsMember
,
changeHistory
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/marketing/SmsFullReductionPromotionController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
marketing
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.MchtProductQueryParam
;
import
com.macro.mall.domain.vo.MchtProductResult
;
import
com.macro.mall.model.SmsActivity
;
import
com.macro.mall.service.promotion.SmsFullReductionPromotionService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"满减活动"
)
@RequestMapping
public
class
SmsFullReductionPromotionController
{
@Resource
private
SmsFullReductionPromotionService
fullReductionPromotionService
;
@GetMapping
(
value
=
"/api/z/full/reductions/activities/products"
)
@ApiOperation
(
"商品列表"
)
public
CommonResult
<
CommonPage
<
MchtProductResult
>>
getList
(
@ModelAttribute
MchtProductQueryParam
productQueryParam
)
{
List
list
=
fullReductionPromotionService
.
getMchtProductList
(
productQueryParam
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/marketing/SmsSeckillPromotionController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
marketing
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.MchtProductQueryParam
;
import
com.macro.mall.domain.dto.marketing.SecKillActivityTimesParam
;
import
com.macro.mall.domain.dto.marketing.SecKillActivityTimesProductParam
;
import
com.macro.mall.domain.vo.MchtProductResult
;
import
com.macro.mall.domain.vo.marketing.SecKillActivityTimesProductVo
;
import
com.macro.mall.domain.vo.marketing.SecKillActivityTimesVo
;
import
com.macro.mall.service.promotion.SmsSeckillPromotionService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"秒杀活动"
)
@RequestMapping
public
class
SmsSeckillPromotionController
{
@Resource
private
SmsSeckillPromotionService
seckillPromotionService
;
@GetMapping
(
value
=
"/api/z/sec/kill/activities/times"
)
@ApiOperation
(
"秒杀时段列表"
)
public
CommonResult
<
List
<
SecKillActivityTimesVo
>>
getTimeList
(
@ModelAttribute
SecKillActivityTimesParam
param
)
{
List
<
SecKillActivityTimesVo
>
list
=
seckillPromotionService
.
getTimeList
(
param
);
return
CommonResult
.
success
(
list
);
}
@GetMapping
(
value
=
"/api/z/sec/kill/activities/products"
)
@ApiOperation
(
"商品列表"
)
public
CommonResult
<
CommonPage
<
SecKillActivityTimesProductVo
>>
getList
(
@ModelAttribute
SecKillActivityTimesProductParam
param
,
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SecKillActivityTimesProductVo
>
list
=
seckillPromotionService
.
getMchtProductList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/member/MemberAccountController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
member
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsProduct
;
import
com.macro.mall.model.UmsAmountChangeHistory
;
import
com.macro.mall.model.UmsMemberAccount
;
import
com.macro.mall.domain.dto.QueryAmountHistoryParam
;
import
com.macro.mall.domain.vo.MemberHomeVo
;
import
com.macro.mall.service.member.UmsMemberAccountService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"会员账号管理"
)
@RequestMapping
(
"account"
)
public
class
MemberAccountController
{
@Autowired
private
UmsMemberAccountService
memberAccountService
;
@ApiOperation
(
"会员账户信息"
)
@GetMapping
public
CommonResult
<
UmsMemberAccount
>
account
()
{
UmsMemberAccount
memberAccount
=
memberAccountService
.
getOne
();
return
CommonResult
.
success
(
memberAccount
);
}
@ApiOperation
(
"会员首页"
)
@RequestMapping
(
value
=
"home"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
MemberHomeVo
>
memberHome
()
{
MemberHomeVo
vo
=
memberAccountService
.
getMemberHome
();
return
CommonResult
.
success
(
vo
);
}
@GetMapping
(
value
=
"product"
)
@ApiOperation
(
"常购商品列表"
)
public
CommonResult
<
List
<
PmsProduct
>>
queryMemberProduct
()
{
List
<
PmsProduct
>
list
=
memberAccountService
.
queryMemberProduct
();
return
CommonResult
.
success
(
list
);
}
@ApiOperation
(
"资金明细"
)
@GetMapping
(
value
=
"amount/history"
)
public
CommonResult
<
CommonPage
<
UmsAmountChangeHistory
>>
queryAmountHistory
(
@ModelAttribute
QueryAmountHistoryParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
UmsAmountChangeHistory
>
list
=
memberAccountService
.
queryMemberAmountHistory
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/member/MemberLevelController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
member
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.vo.member.MemberLevelRecordVo
;
import
com.macro.mall.domain.vo.pay.PayParamVo
;
import
com.macro.mall.model.UmsMemberAccount
;
import
com.macro.mall.model.UmsMemberLevel
;
import
com.macro.mall.model.dto.MemberUpgradeParam
;
import
com.macro.mall.model.dto.MemberUpgradeRecordParam
;
import
com.macro.mall.service.member.MemberLevelRecordService
;
import
com.macro.mall.service.member.UmsMemberAccountService
;
import
com.macro.mall.service.member.UmsMemberLevelService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
@Controller
@Api
(
tags
=
"会员等级列表"
)
@RequestMapping
(
"memberLevels"
)
public
class
MemberLevelController
{
@Resource
private
UmsMemberLevelService
memberLevelService
;
@Resource
private
UmsMemberAccountService
memberAccountService
;
@GetMapping
@ApiOperation
(
"查询所有会员等级"
)
@ResponseBody
public
CommonResult
<
List
<
UmsMemberLevel
>>
list
()
{
List
<
UmsMemberLevel
>
memberLevelList
=
memberLevelService
.
list
(
0
);
return
CommonResult
.
success
(
memberLevelList
);
}
@PostMapping
(
value
=
"upgrade"
)
@ApiOperation
(
"升级会员"
)
@ResponseBody
public
CommonResult
<
PayParamVo
>
upgrade
(
@RequestBody
MemberUpgradeParam
param
,
@ApiIgnore
HttpServletRequest
request
)
{
String
host
=
request
.
getRemoteAddr
();
String
basePath
=
request
.
getScheme
()
+
"://"
+
request
.
getServerName
()
+
":"
+
request
.
getServerPort
()
+
request
.
getContextPath
();
param
.
setBasePath
(
basePath
);
param
.
setHost
(
host
);
UmsMemberAccount
account
=
memberAccountService
.
getOne
();
CommonResult
commonResult
=
memberLevelService
.
upgrade
(
param
,
account
);
return
commonResult
;
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/message/UmsMessageController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
message
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.CmsMessage
;
import
com.macro.mall.model.UmsMember
;
import
com.macro.mall.model.UmsMessage
;
import
com.macro.mall.portal.domain.UmsMessageParam
;
import
com.macro.mall.portal.domain.UmsMessageResult
;
import
com.macro.mall.service.member.UmsMemberService
;
import
com.macro.mall.portal.service.message.UmsMessageService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 会员消息中心Controller
* Created by macro on 2020/2/24.
*/
@RestController
@Api
(
tags
=
"会员消息中心"
,
description
=
"会员消息中心"
)
@RequestMapping
(
"/message"
)
public
class
UmsMessageController
{
@Resource
private
UmsMessageService
umsMessageService
;
@Autowired
private
UmsMemberService
memberService
;
@ApiOperation
(
"查询消息"
)
@RequestMapping
(
value
=
"/getmessage"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
UmsMessageResult
>>
getListMessage
(
Integer
hasRead
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
UmsMember
umsMember
=
memberService
.
getCurrentMember
();
UmsMessage
umsMessage
=
new
UmsMessage
();
umsMessage
.
setMemberId
(
umsMember
.
getId
());
umsMessage
.
setHasRead
(
hasRead
);
List
<
UmsMessageResult
>
messageResults
=
umsMessageService
.
getListMessage
(
umsMessage
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
messageResults
));
}
@ApiOperation
(
"修改/删除消息"
)
@RequestMapping
(
value
=
"/setmessage"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
setHasReadAndDel
(
@RequestBody
UmsMessageParam
umsMessageParam
){
UmsMember
umsMember
=
memberService
.
getCurrentMember
();
umsMessageParam
.
setMemberId
(
umsMember
.
getId
());
Integer
count
=
umsMessageService
.
setHasRead
(
umsMessageParam
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"获取消息详情"
)
@RequestMapping
(
value
=
"/getDetail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CmsMessage
>
getMessageDetail
(
@RequestParam
Long
messageId
){
CmsMessage
cmsMessage
=
umsMessageService
.
getMessageDetial
(
messageId
);
return
CommonResult
.
success
(
cmsMessage
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/onlinestore/OnlineStoreController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
onlinestore
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.PmsDmchtApplyHistoryParam
;
import
com.macro.mall.domain.vo.PmsDmchtApplyHistoryVo
;
import
com.macro.mall.model.PmsDmchtApplyHistory
;
import
com.macro.mall.model.PmsPlatformBinding
;
import
com.macro.mall.service.distributionmcht.PmsDmchtService
;
import
com.macro.mall.service.onlinestore.OnlineStoreService
;
import
com.macro.mall.youzan.common.YzContent
;
import
io.swagger.annotations.*
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.Queue
;
/**
* @ClassName OnlineStoreController
* @Description TODO
* @Author cxh
* @Date 2020/4/10 10:08
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"网店助手"
,
description
=
"网店助手"
)
@RequestMapping
(
value
=
"/online/store"
)
public
class
OnlineStoreController
{
@Resource
private
OnlineStoreService
onlineStoreService
;
@Resource
private
PmsDmchtService
pmsDmchtService
;
@ApiOperation
(
value
=
"获取授权网店列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
PmsPlatformBinding
>>
getPlatformList
(
@RequestParam
Long
memeberId
,
@RequestParam
Integer
sort
,
@RequestParam
Integer
status
){
List
<
PmsPlatformBinding
>
bindings
=
onlineStoreService
.
getPlatformList
(
memeberId
,
sort
,
status
);
return
CommonResult
.
success
(
bindings
);
}
@ApiOperation
(
value
=
"删除"
)
@RequestMapping
(
value
=
"/del"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
delPlatform
(
@RequestParam
Long
id
){
Integer
count
=
onlineStoreService
.
delPlatform
(
id
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"授权"
)
@RequestMapping
(
value
=
"/authorization"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
authorization
(
@RequestParam
Long
memberId
){
String
url
=
YzContent
.
authorization_url
+
"?"
+
"client_id="
+
YzContent
.
client_id
+
"&"
+
"state="
+
memberId
;
return
CommonResult
.
success
(
url
);
}
@ApiOperation
(
value
=
"获取绑定供应商店铺"
)
@RequestMapping
(
value
=
"/dmcht/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsDmchtApplyHistoryVo
>>
getDmchtlist
(
@RequestParam
Long
memberId
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
PmsDmchtApplyHistoryParam
param
=
new
PmsDmchtApplyHistoryParam
();
param
.
setMemberId
(
memberId
);
param
.
setStatus
(
1
);
List
<
PmsDmchtApplyHistoryVo
>
result
=
pmsDmchtService
.
getApplyList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
@ApiOperation
(
value
=
"判断用户是否与指定供应商分销关系"
)
@RequestMapping
(
value
=
"/history"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsDmchtApplyHistory
>
getHistory
(
@RequestParam
Long
memberId
,
@RequestParam
Long
mchtId
){
PmsDmchtApplyHistory
result
=
pmsDmchtService
.
getHistory
(
memberId
,
mchtId
);
return
CommonResult
.
success
(
result
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/onlinestore/ShopGoodsController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
onlinestore
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.vo.shopgoods.ShopGoodsRecordParam
;
import
com.macro.mall.domain.vo.shopgoods.ShopGoodsRecordVo
;
import
com.macro.mall.service.shopgoods.ShopGoodsService
;
import
com.macro.mall.youzan.YouZanItemService
;
import
com.youzan.cloud.open.sdk.common.exception.SDKException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @ClassName ShopGoodsController
* @Description TODO
* @Author cxh
* @Date 2020/4/14 15:10
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"铺货记录"
,
description
=
"铺货记录"
)
@RequestMapping
(
value
=
"/shop/goods"
)
public
class
ShopGoodsController
{
@Resource
private
ShopGoodsService
shopGoodsService
;
@Resource
private
YouZanItemService
youZanItemService
;
@ApiOperation
(
value
=
"获取用户铺货记录"
)
@RequestMapping
(
value
=
"/record"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
ShopGoodsRecordVo
>>
getShopGoodsRecord
(
@ModelAttribute
ShopGoodsRecordParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
ShopGoodsRecordVo
>
result
=
shopGoodsService
.
getShopGoodRecord
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
@ApiOperation
(
value
=
"下架三方平台商品"
)
@RequestMapping
(
value
=
"/delisting"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
delisting
(
@RequestParam
Long
recordId
)
throws
SDKException
{
Integer
count
=
youZanItemService
.
delisting
(
recordId
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取第三方商品详情链接"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
String
>
getDetailUrl
(
@RequestParam
Long
recordId
){
String
url
=
youZanItemService
.
getDetailUrl
(
recordId
);
return
CommonResult
.
success
(
url
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/onlinestore/WebShopOrderController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
onlinestore
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.member.WebShopOrderListParam
;
import
com.macro.mall.domain.vo.member.PmsShopOrderVo
;
import
com.macro.mall.youzan.WebShopOrderService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @ClassName WebShopOrderController
* @Description 网点助手订单管理
* @Author huangjunjie
* @Date 2020/4/14 16:54
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"网点助手订单管理"
)
@RequestMapping
(
value
=
"/web/shop"
)
public
class
WebShopOrderController
{
@Resource
private
WebShopOrderService
shopOrderService
;
@GetMapping
@ApiOperation
(
value
=
"订单列表"
)
public
CommonResult
<
CommonPage
<
PmsShopOrderVo
>>
getList
(
@ModelAttribute
WebShopOrderListParam
param
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
)
{
List
<
PmsShopOrderVo
>
orderSonList
=
shopOrderService
.
getList
(
param
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderSonList
));
}
@PostMapping
@ApiOperation
(
value
=
"同步订单"
)
public
CommonResult
syncOrder
(){
shopOrderService
.
syncOrder
();
return
CommonResult
.
success
(
"同步成功"
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/order/AliPayController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
order
;
import
com.macro.mall.service.pay.AliPayService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
@RestController
@RequestMapping
@Api
(
tags
=
"支付回调"
)
public
class
AliPayController
{
@Resource
private
AliPayService
payService
;
@ApiOperation
(
"支付成功的回调"
)
@PostMapping
(
value
=
"api/z/alipay/callback"
)
public
String
wxPayCallback
(
HttpServletRequest
request
)
{
return
payService
.
saveAliPayNotify
(
request
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/order/OmsCartItemController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
order
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.dto.OmsCartItemDto
;
import
com.macro.mall.model.vo.OmsAddCartItemVo
;
import
com.macro.mall.model.vo.OmsShopCartItemVo
;
import
com.macro.mall.domain.dto.order.PickUpTypeParam
;
import
com.macro.mall.portal.domain.Vo.ProductItemCartResult
;
import
com.macro.mall.portal.service.order.OmsCartItemDetailService
;
import
com.macro.mall.service.order.OmsCartItemService
;
import
com.macro.mall.portal.service.ProductItemService
;
import
com.macro.mall.service.member.UmsMemberService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 购物车管理Controller
* Created by macro on 2018/8/2.
*/
@RestController
@Api
(
tags
=
"购物车管理"
,
description
=
"购物车管理"
)
@RequestMapping
(
"/cart"
)
public
class
OmsCartItemController
{
@Autowired
private
OmsCartItemService
cartItemService
;
@Autowired
private
OmsCartItemDetailService
omsCartItemDetailService
;
@Autowired
private
UmsMemberService
memberService
;
@Resource
private
ProductItemService
productItemService
;
@ApiOperation
(
"添加商品到进货单"
)
@PostMapping
(
value
=
"add"
)
public
CommonResult
<
OmsAddCartItemVo
>
addList
(
@RequestBody
List
<
OmsCartItemDto
>
cartItemList
)
{
OmsAddCartItemVo
vo
=
cartItemService
.
addList
(
cartItemList
);
if
(
vo
!=
null
&&
vo
.
getProductId
()
!=
0
)
{
return
CommonResult
.
success
(
vo
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"获取某个会员的购物车列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
OmsShopCartItemVo
>>
listV2
()
{
List
<
OmsShopCartItemVo
>
cartItemList
=
cartItemService
.
listV2
(
memberService
.
getCurrentMember
().
getId
());
return
CommonResult
.
success
(
cartItemList
);
}
// @ApiOperation("获取某个会员的购物车列表,包括促销信息")
// @RequestMapping(value = "/list/promotion", method = RequestMethod.GET)
// @ResponseBody
// public CommonResult<List<CartPromotionItem>> listPromotion() {
// List<CartPromotionItem> cartPromotionItemList = cartItemService.listPromotion(memberService.getCurrentMember().getId());
// return CommonResult.success(cartPromotionItemList);
// }
@ApiOperation
(
"修改购物车中某个商品的数量"
)
@RequestMapping
(
value
=
"/update/quantity"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
updateQuantity
(
@RequestParam
Long
detailId
,
@RequestParam
Integer
quantity
)
{
int
count
=
cartItemService
.
updateQuantityV2
(
detailId
,
memberService
.
getCurrentMember
().
getId
(),
quantity
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"获取购物车中某个商品的规格,用于重选规格"
)
@RequestMapping
(
value
=
"/product/{productId}"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
ProductItemCartResult
>
getCartProductV2
(
@PathVariable
Long
productId
)
{
ProductItemCartResult
result
=
productItemService
.
getCartProductSkuItems
(
productId
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
"修改购物车中商品的规格"
)
@RequestMapping
(
value
=
"/update/attr"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateAttr
(
@RequestBody
List
<
OmsCartItemDto
>
cartItemList
)
{
int
count
=
cartItemService
.
updateAttrV2
(
cartItemList
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"删除进货单中的某个商品"
)
@DeleteMapping
@ResponseBody
public
CommonResult
delete
(
@RequestBody
List
<
Long
>
ids
)
{
int
count
=
cartItemService
.
delete
(
memberService
.
getCurrentMember
().
getId
(),
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"删除进货单中的某个商品的某个sku"
)
@DeleteMapping
(
value
=
"/sku/delete/{detailId}"
)
@ResponseBody
public
CommonResult
deleteSku
(
@PathVariable
Long
detailId
)
{
int
count
=
omsCartItemDetailService
.
delete
(
memberService
.
getCurrentMember
().
getId
(),
detailId
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"清空购物车"
)
@RequestMapping
(
value
=
"/clear"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
clear
()
{
int
count
=
cartItemService
.
clear
(
memberService
.
getCurrentMember
().
getId
());
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
// 设置代发 或者自提 接口
@ApiOperation
(
"设置代发或者自提 接口"
)
@RequestMapping
(
value
=
"pick_up"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
pickUpType
(
@RequestBody
PickUpTypeParam
pickUpTypeParam
)
{
int
count
=
cartItemService
.
pickUpType
(
pickUpTypeParam
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/order/OmsPortalOrderController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
order
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.common.api.KdniaoSubscribeParam
;
import
com.macro.mall.domain.dto.order.*
;
import
com.macro.mall.domain.dto.pay.PayOrderParam
;
import
com.macro.mall.domain.vo.order.ConfirmOrderResultV2
;
import
com.macro.mall.domain.vo.order.GenerateOrderVo
;
import
com.macro.mall.domain.vo.pay.PayParamVo
;
import
com.macro.mall.model.dto.OmsCartItemDto
;
import
com.macro.mall.model.dto.OmsOrderSonVo
;
import
com.macro.mall.model.vo.OmsOrderItemVo
;
import
com.macro.mall.model.vo.OmsOrderSonDetail
;
import
com.macro.mall.service.order.OmsPortalOrderService
;
import
io.swagger.annotations.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
/**
* 订单管理Controller
* Created by macro on 2018/8/30.
*/
@RestController
@Api
(
tags
=
"订单管理"
)
@RequestMapping
(
"/order"
)
@Slf4j
public
class
OmsPortalOrderController
{
@Autowired
private
OmsPortalOrderService
portalOrderService
;
@GetMapping
@ApiOperation
(
"订单列表"
)
public
CommonResult
<
CommonPage
<
OmsOrderSonVo
>>
orderList
(
@ModelAttribute
OrderListParam
orderListParam
,
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
OmsOrderSonVo
>
list
=
portalOrderService
.
list
(
orderListParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@GetMapping
(
value
=
"logistics"
)
@ApiOperation
(
"查询订单物流信息"
)
public
CommonResult
<
KdniaoSubscribeParam
>
logistics
(
@ModelAttribute
LogisticsParam
param
)
{
CommonResult
result
=
portalOrderService
.
logistics
(
param
);
if
(
result
==
null
)
{
CommonResult
.
failed
(
"查无信息!"
);
}
return
result
;
}
@GetMapping
(
value
=
"again/buy"
)
@ApiOperation
(
"再次购买列表"
)
public
CommonResult
<
CommonPage
<
OmsOrderItemVo
>>
againBuyList
(
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
Long
productCategoryId
)
{
List
<
OmsOrderItemVo
>
list
=
portalOrderService
.
againBuyList
(
pageSize
,
pageNum
,
productCategoryId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@GetMapping
(
value
=
"detail"
)
@ApiOperation
(
"订单详情"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"orderId"
,
value
=
"订单列表id"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"parentOrderId"
,
value
=
"总订单id"
,
dataType
=
"long"
,
paramType
=
"query"
),
})
public
CommonResult
<
OmsOrderSonDetail
>
getOrderById
(
Long
orderId
,
Long
parentOrderId
)
{
OmsOrderSonDetail
omsOrderDetail
=
portalOrderService
.
getOrderDetail
(
orderId
,
parentOrderId
);
return
CommonResult
.
success
(
omsOrderDetail
);
}
@PostMapping
(
value
=
"cancel"
)
@ResponseBody
@ApiOperation
(
"取消订单"
)
public
CommonResult
cancelOrder
(
@RequestBody
CancelOrderParam
param
)
throws
Exception
{
return
portalOrderService
.
cancelOrderV2
(
param
);
}
@PostMapping
(
value
=
"pay"
)
@ResponseBody
@ApiOperation
(
"订单支付"
)
public
CommonResult
<
PayParamVo
>
payOrder
(
@RequestBody
PayOrderParam
param
,
@ApiIgnore
HttpServletRequest
request
)
{
CommonResult
result
;
try
{
String
host
=
request
.
getRemoteAddr
();
String
basePath
=
request
.
getScheme
()
+
"://"
+
request
.
getServerName
()
+
":"
+
request
.
getServerPort
()
+
request
.
getContextPath
();
param
.
setBasePath
(
basePath
);
param
.
setHost
(
host
);
result
=
portalOrderService
.
payOrder
(
param
);
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
CommonResult
.
failed
(
e
.
getMessage
());
}
return
result
;
}
@PostMapping
(
value
=
"confirm/Receiving"
)
@ResponseBody
@ApiOperation
(
"确认收货"
)
public
CommonResult
confirmReceiving
(
@RequestBody
ConfirmReceivingParam
param
)
{
return
portalOrderService
.
confirmReceiving
(
param
);
}
@DeleteMapping
@ResponseBody
@ApiOperation
(
"订单删除--放入回收站"
)
public
CommonResult
deleteOrder
(
@RequestBody
DeleteOrderParam
param
)
{
return
portalOrderService
.
deleteOrder
(
param
);
}
@DeleteMapping
(
value
=
"recycle"
)
@ResponseBody
@ApiOperation
(
"回收站删除订单"
)
public
CommonResult
deleteOrderRecycleBin
(
@RequestBody
DeleteOrderParam
param
)
{
return
portalOrderService
.
deleteOrderRecycleBin
(
param
);
}
@ApiOperation
(
"根据购物车信息生成确认单信息v2"
)
@RequestMapping
(
value
=
"/generateConfirmOrder/v2"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
ConfirmOrderResultV2
>
generateConfirmOrderV2
(
@RequestBody
GenerateConfirmOrderParam
param
)
{
ConfirmOrderResultV2
confirmOrderResult
=
portalOrderService
.
generateConfirmOrder
(
param
);
return
CommonResult
.
success
(
confirmOrderResult
);
}
@ApiOperation
(
"立即订购生成确认单信息v2"
)
@RequestMapping
(
value
=
"immediately/generateConfirmOrder/v2"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
ConfirmOrderResultV2
>
generateImmediatelyConfirmOrderV2
(
@RequestBody
ImmediatelyConfirmOrderParam
param
)
{
ConfirmOrderResultV2
confirmOrderResult
=
portalOrderService
.
generateImmediatelyConfirmOrder
(
param
);
return
CommonResult
.
success
(
confirmOrderResult
);
}
@ApiOperation
(
"根据购物车信息生成订单"
)
@RequestMapping
(
value
=
"/generateOrder"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
GenerateOrderVo
>
generateOrder
(
@RequestBody
OrderParam
orderParam
)
{
return
portalOrderService
.
generateOrderV2
(
orderParam
);
}
@ApiOperation
(
"立即订购生成订单"
)
@RequestMapping
(
value
=
"immediately/generateOrder"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
GenerateOrderVo
>
generateImmediatelyOrder
(
@RequestBody
OrderImmediatelyParam
orderParam
)
{
return
portalOrderService
.
generateOrderV3
(
orderParam
);
}
@ApiOperation
(
"立即支付"
)
@RequestMapping
(
value
=
"immediately/pay"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
GenerateOrderVo
>
generateImmediatelyOrderPay
(
@RequestBody
ImmediatelyPayParam
orderParam
)
{
return
portalOrderService
.
generateImmediatelyOrderPay
(
orderParam
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/order/PayController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
order
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.mcht.PayOrderQueryParam
;
import
com.macro.mall.model.OmsPayOrder
;
import
com.macro.mall.service.pay.OmsPayOrderService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
@RestController
@Api
(
tags
=
"支付订单查询"
)
@RequestMapping
(
"pay"
)
@Slf4j
public
class
PayController
{
@Resource
private
OmsPayOrderService
payOrderService
;
@GetMapping
(
value
=
"order"
)
@ApiOperation
(
"获取当前支付状态"
)
public
CommonResult
<
OmsPayOrder
>
getPayOrder
(
@ModelAttribute
PayOrderQueryParam
param
)
{
OmsPayOrder
payOrder
=
payOrderService
.
getPayOrder
(
param
);
return
CommonResult
.
success
(
payOrder
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/promote/UmsPromoteController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
promote
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.UmsMemberParam
;
import
com.macro.mall.domain.dto.member.UmsMemberHierarchyResult
;
import
com.macro.mall.domain.vo.UmsMemberVo
;
import
com.macro.mall.domain.vo.promotion.CentCommissionVo
;
import
com.macro.mall.domain.vo.promotion.UmsCommissionHistoryResult
;
import
com.macro.mall.service.promote.UmsPromoteService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @ClassName UmsPromoteController
* @Description TODO
* @Author cxh
* @Date 2020/4/2 13:35
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"推广分佣"
,
description
=
"推广分佣"
)
@RequestMapping
(
value
=
"/promote"
)
public
class
UmsPromoteController
{
@Resource
private
UmsPromoteService
promoteService
;
@ApiOperation
(
value
=
"获取用户下级信息(h5)"
)
@RequestMapping
(
value
=
"/lowers"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
UmsMemberVo
>>
getLowers
(
@ModelAttribute
UmsMemberParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNUm"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
UmsMemberVo
>
results
=
promoteService
.
getLowers
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
@ApiOperation
(
value
=
"获取用户分佣历史"
)
@RequestMapping
(
value
=
"/history"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
UmsCommissionHistoryResult
>>
getHistoryList
(
@RequestParam
Long
memberId
,
String
username
,
String
beginTime
,
String
endTime
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
UmsCommissionHistoryResult
>
results
=
promoteService
.
getHistoryList
(
memberId
,
username
,
beginTime
,
endTime
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
@ApiOperation
(
value
=
"获取会员下级信息(会员端)"
)
@RequestMapping
(
value
=
"/lower"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
UmsMemberHierarchyResult
>
getLowers
(
Long
id
,
String
username
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
UmsMemberHierarchyResult
results
=
promoteService
.
getLower
(
id
,
username
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
results
);
}
@ApiOperation
(
value
=
"获取用户分佣信息"
)
@RequestMapping
(
value
=
"/info"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CentCommissionVo
>
getCommisionInfo
(
@RequestParam
Long
memberId
){
CentCommissionVo
commissionVo
=
promoteService
.
getCommisionInfo
(
memberId
);
return
CommonResult
.
success
(
commissionVo
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/servicemarket/PmsMarketServiceController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
servicemarket
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsServiceMchtCategory
;
import
com.macro.mall.portal.domain.servicemarket.PmsSmchtServicParam
;
import
com.macro.mall.portal.domain.servicemarket.PmsSmchtServiceDetailResult
;
import
com.macro.mall.portal.domain.servicemarket.PmsSmchtServiceResult
;
import
com.macro.mall.portal.service.servicemarket.PmsServiceMarketService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @ClassName PmsMarketServiceController
* @Description TODO
* @Author cxh
* @Date 2020/3/28 14:14
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"服务市场服务"
,
description
=
"服务市场服务"
)
@RequestMapping
(
value
=
"/market"
)
public
class
PmsMarketServiceController
{
@Resource
private
PmsServiceMarketService
pmsServiceMarketService
;
@ApiOperation
(
value
=
"服务类目列表"
)
@RequestMapping
(
value
=
"/category"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
PmsServiceMchtCategory
>>
getCategoryList
(){
List
<
PmsServiceMchtCategory
>
categoryList
=
pmsServiceMarketService
.
getCategoryList
();
return
CommonResult
.
success
(
categoryList
);
}
@ApiOperation
(
value
=
"获取服务列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsSmchtServiceResult
>>
getServiceList
(
@ModelAttribute
PmsSmchtServicParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsSmchtServiceResult
>
results
=
pmsServiceMarketService
.
getServiceList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
@ApiOperation
(
value
=
"获取服务详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsSmchtServiceDetailResult
>
getServiceDetail
(
@ApiParam
(
"服务id"
)
@RequestParam
Long
id
){
PmsSmchtServiceDetailResult
result
=
pmsServiceMarketService
.
getServiceDetail
(
id
);
return
CommonResult
.
success
(
result
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/servicemarket/PmsSmchtShopInfoController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
servicemarket
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsMchtShopInfo
;
import
com.macro.mall.portal.domain.Vo.ServiceMchtShopVo
;
import
com.macro.mall.portal.domain.servicemarket.PmsSmchtShopInfoResult
;
import
com.macro.mall.portal.service.servicemarket.PmsServiceShopService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @ClassName PmsSmchtShopInfoController
* @Description TODO
* @Author cxh
* @Date 2020/3/28 14:05
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"服务商店铺"
,
description
=
"服务商店铺"
)
@RequestMapping
(
value
=
"/smchtshop"
)
public
class
PmsSmchtShopInfoController
{
@Resource
private
PmsServiceShopService
pmsServiceShopService
;
@ApiOperation
(
value
=
"获取服务商店铺列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsSmchtShopInfoResult
>>
getShopInfoList
(
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsSmchtShopInfoResult
>
results
=
pmsServiceShopService
.
getShopInfoList
(
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
@ApiOperation
(
value
=
"获取服务商店铺信息"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
ServiceMchtShopVo
>
getShopInfo
(
@ApiParam
(
"店铺id"
)
@RequestParam
Long
id
,
@ApiParam
(
value
=
"商家id"
,
type
=
"query"
)
@RequestParam
Long
mchtId
,
@ApiParam
(
value
=
"查询类型(1店铺id,2商家id)"
,
type
=
"query"
)
@RequestParam
Integer
type
){
ServiceMchtShopVo
shopInfo
=
pmsServiceShopService
.
getShopInfo
(
id
,
mchtId
,
type
);
return
CommonResult
.
success
(
shopInfo
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/spellgoods/MchtSpellGoodsController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
spellgoods
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.vo.spellgoods.MchtSpellAuditVo
;
import
com.macro.mall.model.PmsMchtSpellApply
;
import
com.macro.mall.service.spellgoods.MchtSpellGoodsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
/**
* @ClassName MchtSpellGoodsController
* @Description TODO
* @Author cxh
* @Date 2020/4/28 16:51
* @Version 1.0
*/
@RestController
@Api
(
value
=
"拼货商家"
,
description
=
"拼货商家"
)
@RequestMapping
(
value
=
"/spell/mcht"
)
public
class
MchtSpellGoodsController
{
@Resource
private
MchtSpellGoodsService
mchtSpellGoodsService
;
@ApiOperation
(
value
=
"拼货资格申请"
)
@RequestMapping
(
value
=
"/apply"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
spellApply
(
@RequestBody
PmsMchtSpellApply
apply
)
throws
Exception
{
Integer
count
=
mchtSpellGoodsService
.
spellApply
(
apply
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"查询商家拼货资格"
)
@RequestMapping
(
value
=
"/query/audit"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
MchtSpellAuditVo
>
getMchtAudit
(
@RequestParam
Long
mchtId
){
MchtSpellAuditVo
result
=
mchtSpellGoodsService
.
getMchtAudit
(
mchtId
);
return
CommonResult
.
success
(
result
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/spellgoods/SpellGoodsController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
spellgoods
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.spellgoods.AddSpellGoodsParam
;
import
com.macro.mall.service.spellgoods.SpellGoodsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
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
;
/**
* @ClassName SpellGoodsController
* @Description TODO
* @Author cxh
* @Date 2020/4/30 9:17
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"拼货商品管理"
,
description
=
"拼货商品管理"
)
@RequestMapping
(
value
=
"/spell/goods"
)
public
class
SpellGoodsController
{
@Resource
private
SpellGoodsService
spellGoodsService
;
@ApiOperation
(
value
=
"添加拼货商品"
)
@RequestMapping
(
value
=
"add"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
addSpellGoods
(
@RequestBody
AddSpellGoodsParam
param
)
throws
Exception
{
Integer
count
=
spellGoodsService
.
addSpellGoods
(
param
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/youzan/YzCallbackController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
youzan
;
/*
*
*/
import
com.macro.mall.youzan.YouZanService
;
import
com.youzan.cloud.open.sdk.common.exception.SDKException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.IOException
;
/**
* @ClassName YzCallbackController
* @Description TODO
* @Author cxh
* @Date 2020/4/7 16:54
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"有赞回调"
,
description
=
"有赞回调"
)
@RequestMapping
(
value
=
"/api/z/youzan"
)
public
class
YzCallbackController
{
@Resource
private
YouZanService
youZanService
;
@ApiOperation
(
value
=
"有赞回调"
)
@RequestMapping
(
value
=
"/callback"
,
method
=
RequestMethod
.
GET
)
public
void
yzCallback
(
HttpServletResponse
response
,
@RequestParam
String
code
,
String
state
)
throws
SDKException
,
IOException
{
boolean
count
=
youZanService
.
yzCallback
(
code
,
state
);
response
.
sendRedirect
(
"http://web.haihaigo.jsonpro.cn/#/user/menuLayout/authorization"
);
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/youzan/YzProductController.java
deleted
100644 → 0
View file @
a5ce43c5
package
com
.
macro
.
mall
.
portal
.
controller
.
youzan
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.youzan.YouZanItemService
;
import
com.youzan.cloud.open.sdk.common.exception.SDKException
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.annotation.Resource
;
/**
* @ClassName YzProductController
* @Description TODO
* @Author cxh
* @Date 2020/4/13 16:43
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"有赞商品"
,
description
=
"有赞商品"
)
@RequestMapping
(
value
=
"/youzan/product"
)
public
class
YzProductController
{
@Resource
private
YouZanItemService
youZanItemService
;
@ApiOperation
(
value
=
"一键上传"
)
@RequestMapping
(
value
=
"/put"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
putProduct
(
@RequestParam
Long
memberId
,
@RequestParam
Long
productId
,
@RequestParam
Long
shopId
)
throws
SDKException
{
Integer
count
=
youZanItemService
.
create
(
memberId
,
productId
,
shopId
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-service/src/main/java/com/macro/mall/service/product/PmsProductService.java
View file @
2bbcb6e2
...
...
@@ -175,7 +175,7 @@ public interface PmsProductService {
* @param name
* @return
*/
List
<
PmsProduct
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
);
List
<
PmsProduct
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
,
Integer
auditStatus
);
/**
* 根据Id修改传入参数
...
...
mall-service/src/main/java/com/macro/mall/service/product/impl/PmsProductServiceImpl.java
View file @
2bbcb6e2
...
...
@@ -43,7 +43,6 @@ import java.lang.reflect.Method;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
@Transactional
@Slf4j
...
...
@@ -778,13 +777,16 @@ public class PmsProductServiceImpl implements PmsProductService {
* @return
*/
@Override
public
List
<
PmsProduct
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
){
public
List
<
PmsProduct
>
getPageList
(
Integer
pageNum
,
Integer
pageSize
,
String
name
,
Integer
auditStatus
){
PageHelper
.
startPage
(
pageNum
,
pageSize
);
PmsProductExample
example
=
new
PmsProductExample
();
PmsProductExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
name
!=
null
&&
!
""
.
equals
(
name
)){
criteria
.
andNameLike
(
"%"
+
"name"
+
"%"
);
}
if
(
auditStatus
==
null
){
criteria
.
andAuditStatusEqualTo
(
auditStatus
);
}
return
this
.
pmsProductMapper
.
selectByExample
(
example
);
}
...
...
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