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
2ea78370
Commit
2ea78370
authored
Jul 06, 2020
by
XiaHou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
万科文档下载
parent
160e551d
Hide whitespace changes
Inline
Side-by-side
Showing
134 changed files
with
40 additions
and
8928 deletions
+40
-8928
CmsPrefrenceAreaController.java
...com/macro/mall/controller/CmsPrefrenceAreaController.java
+0
-34
CmsSubjectController.java
.../java/com/macro/mall/controller/CmsSubjectController.java
+0
-46
OmsCompanyAddressController.java
...om/macro/mall/controller/OmsCompanyAddressController.java
+0
-52
OmsOrderReturnApplyController.java
.../macro/mall/controller/OmsOrderReturnApplyController.java
+0
-73
OmsOrderReturnReasonController.java
...macro/mall/controller/OmsOrderReturnReasonController.java
+0
-87
OmsOrderSettingController.java
.../com/macro/mall/controller/OmsOrderSettingController.java
+0
-42
PmsAdController.java
.../main/java/com/macro/mall/controller/PmsAdController.java
+0
-181
PmsAlbumController.java
...in/java/com/macro/mall/controller/PmsAlbumController.java
+0
-152
PmsAreaController.java
...ain/java/com/macro/mall/controller/PmsAreaController.java
+0
-44
PmsBrandController.java
...in/java/com/macro/mall/controller/PmsBrandController.java
+0
-159
PmsCommentController.java
.../java/com/macro/mall/controller/PmsCommentController.java
+0
-112
PmsProductAttributeCategoryController.java
...all/controller/PmsProductAttributeCategoryController.java
+0
-101
PmsProductAttributeController.java
.../macro/mall/controller/PmsProductAttributeController.java
+0
-127
PmsProductAttributeGroupController.java
...o/mall/controller/PmsProductAttributeGroupController.java
+0
-109
PmsProductAttributeTypeController.java
...ro/mall/controller/PmsProductAttributeTypeController.java
+0
-89
PmsProductCategoryController.java
...m/macro/mall/controller/PmsProductCategoryController.java
+0
-164
PmsProductController.java
.../java/com/macro/mall/controller/PmsProductController.java
+0
-111
PmsProductLabelController.java
.../com/macro/mall/controller/PmsProductLabelController.java
+0
-140
PmsProductMchtCategoryController.java
...cro/mall/controller/PmsProductMchtCategoryController.java
+0
-106
PmsProductRecommendController.java
.../macro/mall/controller/PmsProductRecommendController.java
+0
-38
PmsProductSynController.java
...va/com/macro/mall/controller/PmsProductSynController.java
+0
-64
PmsSkuStockController.java
...java/com/macro/mall/controller/PmsSkuStockController.java
+0
-43
PmsStallPositionManageController.java
...cro/mall/controller/PmsStallPositionManageController.java
+0
-107
PmsStoreyManageController.java
.../com/macro/mall/controller/PmsStoreyManageController.java
+0
-75
SmsCouponController.java
...n/java/com/macro/mall/controller/SmsCouponController.java
+0
-100
SmsCouponHistoryController.java
...com/macro/mall/controller/SmsCouponHistoryController.java
+0
-40
SmsFlashPromotionController.java
...om/macro/mall/controller/SmsFlashPromotionController.java
+0
-87
SmsFlashPromotionProductRelationController.java
...ontroller/SmsFlashPromotionProductRelationController.java
+0
-78
SmsFlashPromotionSessionController.java
...o/mall/controller/SmsFlashPromotionSessionController.java
+0
-94
SmsHomeAdvertiseController.java
...com/macro/mall/controller/SmsHomeAdvertiseController.java
+0
-85
SmsHomeBrandController.java
...ava/com/macro/mall/controller/SmsHomeBrandController.java
+0
-80
SmsHomeNewProductController.java
...om/macro/mall/controller/SmsHomeNewProductController.java
+0
-80
SmsHomeRecommendProductController.java
...ro/mall/controller/SmsHomeRecommendProductController.java
+0
-80
SmsHomeRecommendSubjectController.java
...ro/mall/controller/SmsHomeRecommendSubjectController.java
+0
-80
UmsActivityTrainingController.java
.../macro/mall/controller/UmsActivityTrainingController.java
+0
-116
SmsActivityController.java
...macro/mall/controller/activity/SmsActivityController.java
+0
-77
SmsActivityMchtProductController.java
...controller/activity/SmsActivityMchtProductController.java
+0
-53
OmsAfterSalesController.java
...o/mall/controller/aftersales/OmsAfterSalesController.java
+0
-128
CmsArticleClassityController.java
...mall/controller/article/CmsArticleClassityController.java
+0
-86
CmsArticleController.java
...m/macro/mall/controller/article/CmsArticleController.java
+0
-104
CmsCustomColumnController.java
...ll/controller/customcolumn/CmsCustomColumnController.java
+0
-59
UmsDistributionRulesController.java
...ntroller/distribution/UmsDistributionRulesController.java
+0
-48
UmsMemberHierarchyController.java
...controller/distribution/UmsMemberHierarchyController.java
+0
-51
PmsDmchtController.java
.../mall/controller/distributionmcht/PmsDmchtController.java
+0
-75
PmsDmchtLevelController.java
.../controller/distributionmcht/PmsDmchtLevelController.java
+0
-53
PmsExpressCompanyController.java
.../mall/controller/express/PmsExpressCompanyController.java
+0
-66
PmsFreightTemplateController.java
...mall/controller/express/PmsFreightTemplateController.java
+0
-80
PmsMchtExtractTimeController.java
...mall/controller/express/PmsMchtExtractTimeController.java
+0
-67
CmsFeedbackClassifyController.java
...ll/controller/feedback/CmsFeedbackClassifyController.java
+0
-68
CmsFeedbackController.java
...macro/mall/controller/feedback/CmsFeedbackController.java
+0
-79
FinanceOrderController.java
...macro/mall/controller/finance/FinanceOrderController.java
+0
-43
PmsMchtAccountController.java
...cro/mall/controller/finance/PmsMchtAccountController.java
+0
-80
PmsMchtFundsDetailController.java
...mall/controller/finance/PmsMchtFundsDetailController.java
+0
-33
PmsMchtSettlementController.java
.../mall/controller/finance/PmsMchtSettlementController.java
+0
-50
PmsMemberSettlementController.java
...all/controller/finance/PmsMemberSettlementController.java
+0
-59
SmsIntegralGiftController.java
...o/mall/controller/integral/SmsIntegralGiftController.java
+0
-95
SysRechargeConfigController.java
...mall/controller/integral/SysRechargeConfigController.java
+0
-45
UmsIntegralController.java
...macro/mall/controller/integral/UmsIntegralController.java
+0
-117
OmsAdminComplaintApplicationController.java
...ntroller/mcht/OmsAdminComplaintApplicationController.java
+0
-64
PmsMchtPlatCategoryController.java
...o/mall/controller/mcht/PmsMchtPlatCategoryController.java
+0
-47
UmsAdminWithdrawalReviewController.java
...l/controller/mcht/UmsAdminWithdrawalReviewController.java
+0
-111
UmsMchtHomeController.java
...com/macro/mall/controller/mcht/UmsMchtHomeController.java
+0
-35
UmsMchtWithdrawAccountController.java
...all/controller/mcht/UmsMchtWithdrawAccountController.java
+0
-46
PmsMchtCommentController.java
...mall/controller/mchtcomment/PmsMchtCommentController.java
+0
-56
PmsMchtDataController.java
...macro/mall/controller/mchtdata/PmsMchtDataController.java
+0
-172
UmsMemberAccountController.java
...ro/mall/controller/member/UmsMemberAccountController.java
+0
-63
UmsMemberController.java
...com/macro/mall/controller/member/UmsMemberController.java
+0
-99
UmsMemberLevelController.java
...acro/mall/controller/member/UmsMemberLevelController.java
+0
-71
UmsMemberPhoneReviewController.java
...all/controller/member/UmsMemberPhoneReviewController.java
+0
-49
UmsMemberTagController.java
.../macro/mall/controller/member/UmsMemberTagController.java
+0
-51
CmsMessageController.java
...m/macro/mall/controller/message/CmsMessageController.java
+0
-63
EmailSetController.java
.../macro/mall/controller/messageset/EmailSetController.java
+0
-56
SmsSetController.java
...om/macro/mall/controller/messageset/SmsSetController.java
+0
-67
OmsOrderController.java
...a/com/macro/mall/controller/order/OmsOrderController.java
+0
-191
PmsFundsConfigController.java
...ro/mall/controller/platform/PmsFundsConfigController.java
+0
-35
PmsPlatformAccountController.java
...all/controller/platform/PmsPlatformAccountController.java
+0
-32
PmsSearchWordController.java
...cro/mall/controller/platform/PmsSearchWordController.java
+0
-32
PmsProductDataController.java
...mall/controller/productdata/PmsProductDataController.java
+0
-40
SmsFullReductionPromotionController.java
...roller/promotion/SmsFullReductionPromotionController.java
+0
-75
SmsSeckillPromotionController.java
...l/controller/promotion/SmsSeckillPromotionController.java
+0
-76
SmsSeckillPromotionPlatformTimeController.java
.../promotion/SmsSeckillPromotionPlatformTimeController.java
+0
-58
PmsSupplierAuditController.java
.../mall/controller/quanxing/PmsSupplierAuditController.java
+0
-52
OmsReturnParcelController.java
...ll/controller/returnparcel/OmsReturnParcelController.java
+0
-70
OmsComplaintApplicationController.java
.../controller/review/OmsComplaintApplicationController.java
+0
-64
PmsCommodityReportController.java
.../mall/controller/review/PmsCommodityReportController.java
+0
-73
UmsWithdrawalReviewController.java
...mall/controller/review/UmsWithdrawalReviewController.java
+0
-98
PmsApplyParamSetController.java
...ll/controller/servicemcht/PmsApplyParamSetController.java
+0
-62
PmsServiceMchtCategoryController.java
...troller/servicemcht/PmsServiceMchtCategoryController.java
+0
-84
PmsServiceMchtController.java
...mall/controller/servicemcht/PmsServiceMchtController.java
+0
-150
PmsSmchtServiceController.java
...all/controller/servicemcht/PmsSmchtServiceController.java
+0
-118
KdniaoSubscribeController.java
...acro/mall/controller/setup/KdniaoSubscribeController.java
+0
-79
OmsComplaintDeadlineController.java
...mall/controller/setup/OmsComplaintDeadlineController.java
+0
-47
OmsComplaintTypeController.java
...cro/mall/controller/setup/OmsComplaintTypeController.java
+0
-91
SysMallSetupController.java
...m/macro/mall/controller/setup/SysMallSetupController.java
+0
-78
UmsReportPunishmentController.java
.../mall/controller/setup/UmsReportPunishmentController.java
+0
-48
UmsReportThemeController.java
...macro/mall/controller/setup/UmsReportThemeController.java
+0
-82
UmsReportTypeController.java
.../macro/mall/controller/setup/UmsReportTypeController.java
+0
-81
UmsWithdrawalAmountController.java
.../mall/controller/setup/UmsWithdrawalAmountController.java
+0
-46
PmsshopDecorateController.java
...ll/controller/shopdecorate/PmsshopDecorateController.java
+0
-227
PmsShopLevelController.java
...cro/mall/controller/shoplevel/PmsShopLevelController.java
+0
-99
MchtSpellGoodsController.java
.../mall/controller/spellgoods/MchtSpellGoodsController.java
+0
-59
SpellGoodsController.java
...acro/mall/controller/spellgoods/SpellGoodsController.java
+0
-93
MchtStatisticalController.java
...all/controller/statistical/MchtStatisticalController.java
+0
-65
MemberStatisticalController.java
...l/controller/statistical/MemberStatisticalController.java
+0
-62
OrderStatisticalController.java
...ll/controller/statistical/OrderStatisticalController.java
+0
-46
ProductStatisticalController.java
.../controller/statistical/ProductStatisticalController.java
+0
-71
ShopStatisticalController.java
...all/controller/statistical/ShopStatisticalController.java
+0
-67
ProductTask.java
...n/src/main/java/com/macro/mall/scheduled/ProductTask.java
+2
-1
PromotionTask.java
...src/main/java/com/macro/mall/scheduled/PromotionTask.java
+2
-1
SettlementTask.java
...rc/main/java/com/macro/mall/scheduled/SettlementTask.java
+2
-1
YouZanOrderTask.java
...c/main/java/com/macro/mall/scheduled/YouZanOrderTask.java
+2
-1
application.yml
mall-admin/src/main/resources/application.yml
+4
-4
bootstrap-dev.yml
mall-admin/src/main/resources/bootstrap-dev.yml
+2
-2
bootstrap-prod.yml
mall-admin/src/main/resources/bootstrap-prod.yml
+2
-1
application-dev.yml
mall-config/src/main/resources/application-dev.yml
+2
-2
application-native.yml
mall-config/src/main/resources/application-native.yml
+2
-2
application-prod.yml
mall-config/src/main/resources/application-prod.yml
+2
-1
application.yml
mall-config/src/main/resources/application.yml
+1
-1
application-dev.yml
mall-gateway/src/main/resources/application-dev.yml
+1
-1
application-prod.yml
mall-gateway/src/main/resources/application-prod.yml
+1
-1
application.yml
mall-gateway/src/main/resources/application.yml
+1
-1
generatorConfig.xml
mall-mbg/src/main/resources/generatorConfig.xml
+1
-1
UmsMemberController.java
...ro/mall/portal/controller/member/UmsMemberController.java
+5
-5
OmsChoseProductController.java
...portal/controller/quanxing/OmsChoseProductController.java
+0
-59
PmsProductAttributeCategoryController.java
...oller/quanxing/PmsProductAttributeCategoryController.java
+0
-43
PmsProductController.java
...mall/portal/controller/quanxing/PmsProductController.java
+0
-99
PmsSearchWordController.java
...l/portal/controller/quanxing/PmsSearchWordController.java
+0
-44
PmsSupplierAuditController.java
...ortal/controller/quanxing/PmsSupplierAuditController.java
+0
-62
SendMsgController.java
...ro/mall/portal/controller/quanxing/SendMsgController.java
+0
-32
application.yml
mall-portal/src/main/resources/application.yml
+3
-3
bootstrap-dev.yml
mall-portal/src/main/resources/bootstrap-dev.yml
+2
-2
bootstrap-prod.yml
mall-portal/src/main/resources/bootstrap-prod.yml
+2
-1
application.yml
mall-registry/src/main/resources/application.yml
+1
-1
quanxing.iml
quanxing.iml
+0
-63
No files found.
mall-admin/src/main/java/com/macro/mall/controller/CmsPrefrenceAreaController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.CmsPrefrenceArea
;
import
com.macro.mall.service.CmsPrefrenceAreaService
;
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/6/1.
*/
@Controller
@Api
(
tags
=
"商品优选管理(?)"
,
description
=
"商品优选管理"
)
@RequestMapping
(
"/prefrenceArea"
)
public
class
CmsPrefrenceAreaController
{
@Resource
private
CmsPrefrenceAreaService
prefrenceAreaService
;
@ApiOperation
(
"获取所有商品优选"
)
@RequestMapping
(
value
=
"/listAll"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
CmsPrefrenceArea
>>
listAll
()
{
List
<
CmsPrefrenceArea
>
prefrenceAreaList
=
prefrenceAreaService
.
listAll
();
return
CommonResult
.
success
(
prefrenceAreaList
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/CmsSubjectController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.CmsSubject
;
import
com.macro.mall.service.CmsSubjectService
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 商品专题Controller
* Created by macro on 2018/6/1.
*/
@Controller
@Api
(
tags
=
"商品专题管理(?)"
,
description
=
"商品专题管理"
)
@RequestMapping
(
"/subject"
)
public
class
CmsSubjectController
{
@Resource
private
CmsSubjectService
subjectService
;
@ApiOperation
(
"获取全部商品专题"
)
@RequestMapping
(
value
=
"/listAll"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
CmsSubject
>>
listAll
()
{
List
<
CmsSubject
>
subjectList
=
subjectService
.
listAll
();
return
CommonResult
.
success
(
subjectList
);
}
@ApiOperation
(
value
=
"根据专题名称分页获取专题"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
CmsSubject
>>
getList
(
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
)
{
List
<
CmsSubject
>
subjectList
=
subjectService
.
list
(
keyword
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
subjectList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/OmsCompanyAddressController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.OmsCompanyAddress
;
import
com.macro.mall.service.OmsCompanyAddressService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
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/10/18.
*/
@Controller
@Api
(
tags
=
"收货地址管理"
)
@RequestMapping
(
"companyAddresses"
)
public
class
OmsCompanyAddressController
{
@Resource
private
OmsCompanyAddressService
companyAddressService
;
@ApiOperation
(
"获取所有收货地址"
)
@GetMapping
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"type"
,
value
=
"类型 1发货 2收货 "
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"query"
)
})
public
CommonResult
<
List
<
OmsCompanyAddress
>>
list
(
Integer
type
)
{
List
<
OmsCompanyAddress
>
companyAddressList
=
companyAddressService
.
list
(
type
);
return
CommonResult
.
success
(
companyAddressList
);
}
@ApiOperation
(
"新增/修改收货地址"
)
@PostMapping
@ResponseBody
public
CommonResult
create
(
@RequestBody
OmsCompanyAddress
address
)
{
CommonResult
commonResult
=
companyAddressService
.
create
(
address
);
return
commonResult
;
}
@ApiOperation
(
"删除收货地址"
)
@DeleteMapping
(
value
=
"{id}"
)
@ResponseBody
public
CommonResult
delete
(
@PathVariable
Long
id
)
{
CommonResult
commonResult
=
companyAddressService
.
delete
(
id
);
return
commonResult
;
}
}
mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnApplyController.java
deleted
100644 → 0
View file @
160e551d
/*
package com.macro.mall.controller;
import com.macro.mall.common.api.CommonPage;
import com.macro.mall.common.api.CommonResult;
import com.macro.mall.dto.OmsOrderReturnApplyResult;
import com.macro.mall.dto.OmsReturnApplyQueryParam;
import com.macro.mall.dto.OmsUpdateStatusParam;
import com.macro.mall.model.OmsOrderReturnApply;
import com.macro.mall.service.OmsOrderReturnApplyService;
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;
*/
/**
* 订单退货申请管理
* Created by macro on 2018/10/18.
*//*
@Controller
@Api(tags = "OmsOrderReturnApplyController", description = "订单退货申请管理")
@RequestMapping("/returnApply")
public class OmsOrderReturnApplyController {
@Resource
private OmsOrderReturnApplyService returnApplyService;
@ApiOperation("分页查询退货申请")
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public CommonResult<CommonPage<OmsOrderReturnApply>> list(OmsReturnApplyQueryParam queryParam,
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
List<OmsOrderReturnApply> returnApplyList = returnApplyService.list(queryParam, pageSize, pageNum);
return CommonResult.success(CommonPage.restPage(returnApplyList));
}
@ApiOperation("批量删除申请")
@RequestMapping(value = "/delete", method = RequestMethod.POST)
@ResponseBody
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
int count = returnApplyService.delete(ids);
if (count > 0) {
return CommonResult.success(count);
}
return CommonResult.failed();
}
@ApiOperation("获取退货申请详情")
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
@ResponseBody
public CommonResult getItem(@PathVariable Long id) {
OmsOrderReturnApplyResult result = returnApplyService.getItem(id);
return CommonResult.success(result);
}
@ApiOperation("修改申请状态")
@RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST)
@ResponseBody
public CommonResult updateStatus(@PathVariable Long id, @RequestBody OmsUpdateStatusParam statusParam) {
int count = returnApplyService.updateStatus(id, statusParam);
if (count > 0) {
return CommonResult.success(count);
}
return CommonResult.failed();
}
}
*/
mall-admin/src/main/java/com/macro/mall/controller/OmsOrderReturnReasonController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
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.service.OmsOrderReturnReasonService
;
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/10/17.
*/
@Controller
@Api
(
tags
=
"退货原因管理"
,
description
=
"退货原因管理"
)
@RequestMapping
(
"/returnReason"
)
public
class
OmsOrderReturnReasonController
{
@Resource
private
OmsOrderReturnReasonService
orderReturnReasonService
;
@ApiOperation
(
"添加退货原因"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
OmsOrderReturnReason
returnReason
)
{
int
count
=
orderReturnReasonService
.
create
(
returnReason
);
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
OmsOrderReturnReason
returnReason
)
{
int
count
=
orderReturnReasonService
.
update
(
id
,
returnReason
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量删除退货原因"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
int
count
=
orderReturnReasonService
.
delete
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"分页查询全部退货原因"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
OmsOrderReturnReason
>>
list
(
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
OmsOrderReturnReason
>
reasonList
=
orderReturnReasonService
.
list
(
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
reasonList
));
}
@ApiOperation
(
"获取单个退货原因详情信息"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
OmsOrderReturnReason
>
getItem
(
@PathVariable
Long
id
)
{
OmsOrderReturnReason
reason
=
orderReturnReasonService
.
getItem
(
id
);
return
CommonResult
.
success
(
reason
);
}
@ApiOperation
(
"修改退货原因启用状态"
)
@RequestMapping
(
value
=
"/update/status"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateStatus
(
@RequestParam
(
value
=
"status"
)
Integer
status
,
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
int
count
=
orderReturnReasonService
.
updateStatus
(
ids
,
status
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
}
mall-admin/src/main/java/com/macro/mall/controller/OmsOrderSettingController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.OmsOrderSetting
;
import
com.macro.mall.service.order.OmsOrderSettingService
;
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
;
/**
* 订单设置Controller
* Created by macro on 2018/10/16.
*/
@Controller
@Api
(
tags
=
"订单设置管理"
,
description
=
"订单设置管理"
)
@RequestMapping
(
"/orderSetting"
)
public
class
OmsOrderSettingController
{
@Resource
private
OmsOrderSettingService
orderSettingService
;
@ApiOperation
(
"获取指定订单设置"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
OmsOrderSetting
>
getItem
(
@PathVariable
Long
id
)
{
OmsOrderSetting
orderSetting
=
orderSettingService
.
getItem
(
id
);
return
CommonResult
.
success
(
orderSetting
);
}
@ApiOperation
(
"修改指定订单设置"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@PathVariable
Long
id
,
@RequestBody
OmsOrderSetting
orderSetting
)
{
int
count
=
orderSettingService
.
update
(
id
,
orderSetting
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsAdController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.PmsAdPositionParam
;
import
com.macro.mall.dto.PmsAdQueryParam
;
import
com.macro.mall.dto.PmsAdResult
;
import
com.macro.mall.model.PmsAd
;
import
com.macro.mall.model.PmsAdPosition
;
import
com.macro.mall.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.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Controller
@Api
(
tags
=
"广告相关接口"
,
description
=
"广告相关接口"
)
@RequestMapping
(
"/ad"
)
public
class
PmsAdController
{
@Resource
private
PmsAdService
pmsAdService
;
@ApiOperation
(
value
=
"广告位置列表"
)
@RequestMapping
(
value
=
"/adList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:read')")
public
CommonResult
<
CommonPage
<
PmsAdResult
>>
adList
(
@RequestBody
PmsAdQueryParam
pmsAdQueryParam
,
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsAdResult
>
pmsAdResults
=
pmsAdService
.
adList
(
pmsAdQueryParam
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
pmsAdResults
));
}
@ApiOperation
(
value
=
"添加广告"
)
@RequestMapping
(
value
=
"/saveAd"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:create')")
public
CommonResult
saveAd
(
@RequestBody
PmsAd
PmsAd
,
BindingResult
result
)
{
CommonResult
commonResult
;
int
count
=
pmsAdService
.
saveAd
(
PmsAd
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"根据编号查询广告信息"
)
@RequestMapping
(
value
=
"/adInfo"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
<
PmsAd
>
adInfo
(
@ApiParam
(
"广告id"
)
@RequestParam
Long
id
)
{
return
CommonResult
.
success
(
pmsAdService
.
adInfo
(
id
));
}
@ApiOperation
(
value
=
"更新广告信息"
)
@RequestMapping
(
value
=
"/updateAd"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
<
PmsAdPosition
>
updateAd
(
@RequestBody
PmsAd
pmsAd
)
{
CommonResult
commonResult
;
int
count
=
pmsAdService
.
updateAd
(
pmsAd
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"删除广告信息"
)
@RequestMapping
(
value
=
"/deleteAd"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
deleteAd
(
@ApiParam
(
"广告id"
)
@RequestParam
Long
id
)
{
CommonResult
commonResult
;
int
count
=
pmsAdService
.
deleteAd
(
id
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"更改广告开启关闭状态"
)
@RequestMapping
(
value
=
"/updateAdStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
updateAdStatus
(
@ApiParam
(
"广告id"
)
@RequestParam
Long
id
,
@ApiParam
(
"状态0禁用 1开启"
)
@RequestParam
Integer
adStatus
)
{
CommonResult
commonResult
;
int
count
=
pmsAdService
.
updateAdStatus
(
id
,
adStatus
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"广告位置列表"
)
@RequestMapping
(
value
=
"/adPositionList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:read')")
public
CommonResult
<
CommonPage
<
PmsAdPosition
>>
adPositionList
(
@ApiParam
(
"排序类型1宽度升序 2宽度降序 3高度升序 4高度升序"
)
@RequestParam
(
required
=
false
)
Integer
type
,
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsAdPosition
>
pmsAdPositions
=
pmsAdService
.
adPositionList
(
type
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
pmsAdPositions
));
}
@ApiOperation
(
value
=
"添加广告位置"
)
@RequestMapping
(
value
=
"/saveAdPosition"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:create')")
public
CommonResult
saveAdPosition
(
@RequestBody
PmsAdPositionParam
adPositionParam
,
BindingResult
result
)
{
CommonResult
commonResult
;
int
count
=
pmsAdService
.
saveAdPosition
(
adPositionParam
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"根据编号查询广告位置信息"
)
@RequestMapping
(
value
=
"/adPositionInfo"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
<
PmsAdPosition
>
adPositionInfo
(
@ApiParam
(
"广告位置id"
)
@RequestParam
Long
id
)
{
return
CommonResult
.
success
(
pmsAdService
.
adPositionInfo
(
id
));
}
@ApiOperation
(
value
=
"更新广告位置信息"
)
@RequestMapping
(
value
=
"/updateAdPosition"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
<
PmsAdPosition
>
updateAdPosition
(
@RequestBody
PmsAdPositionParam
adPositionParam
)
{
CommonResult
commonResult
;
int
count
=
pmsAdService
.
updateAdPosition
(
adPositionParam
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"广告位置开启与禁用"
)
@RequestMapping
(
value
=
"/updateAdPositionState"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
updateAdPositionState
(
@ApiParam
(
"广告位置id"
)
@RequestParam
Long
id
,
@ApiParam
(
"状态 0禁用 1开启"
)
@RequestParam
Integer
state
)
{
CommonResult
commonResult
;
int
count
=
pmsAdService
.
updateAdPositionState
(
id
,
state
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"根据广告位置获取广告信息"
)
@RequestMapping
(
value
=
"/getByPosition"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
PmsAdResult
>>
getPdByPosition
(
@ApiParam
(
"广告位置编码"
)
@RequestParam
Integer
type
){
List
<
PmsAdResult
>
results
=
pmsAdService
.
getPdByPosition
(
type
);
return
CommonResult
.
success
(
results
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsAlbumController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.AlbumResult
;
import
com.macro.mall.model.PmsAlbum
;
import
com.macro.mall.model.PmsAlbumPic
;
import
com.macro.mall.service.PmsAlbumService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 相册
*/
@Controller
@Api
(
tags
=
"相册管理管理"
,
description
=
"相册管理管理"
)
@RequestMapping
(
"/Album"
)
public
class
PmsAlbumController
{
@Resource
private
PmsAlbumService
umsAlbumService
;
@ApiOperation
(
value
=
"获取全部相册列表"
)
@RequestMapping
(
value
=
"/listAll"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:read')")
public
CommonResult
<
CommonPage
<
AlbumResult
>>
getList
(
@ApiParam
(
"用户id"
)
@RequestParam
(
required
=
false
)
Long
userId
,
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
AlbumResult
>
pmsAlbums
=
umsAlbumService
.
listAll
(
userId
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
pmsAlbums
));
}
@ApiOperation
(
value
=
"添加相册"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:create')")
public
CommonResult
create
(
@Validated
@RequestBody
PmsAlbum
pmsAlbum
)
{
CommonResult
commonResult
;
int
count
=
umsAlbumService
.
createAlbum
(
pmsAlbum
);
if
(
count
>=
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"更新相册"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:update')")
public
CommonResult
update
(
@PathVariable
(
"id"
)
Long
id
,
@Validated
@RequestBody
PmsAlbum
pmsAlbum
)
{
CommonResult
commonResult
;
int
count
=
umsAlbumService
.
updateAlbum
(
pmsAlbum
);
if
(
count
>=
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"删除相册(包含批量)"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:delete')")
public
CommonResult
delete
(
@ApiParam
(
"相册id集合"
)
@RequestParam
List
<
Long
>
ids
)
{
int
count
=
umsAlbumService
.
deleteAlbum
(
ids
);
if
(
count
==
1
)
{
return
CommonResult
.
success
(
null
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"批量转移相册"
)
@RequestMapping
(
value
=
"/updateMoveAlbum"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:delete')")
public
CommonResult
updateMoveAlbum
(
@ApiParam
(
"需要转移的相册id集合"
)
@RequestParam
List
<
Long
>
ids
,
@ApiParam
(
"转移的目标相册id"
)
@RequestParam
Long
tagId
)
{
int
count
=
umsAlbumService
.
updateMoveAlbum
(
ids
,
tagId
);
if
(
count
==
1
)
{
return
CommonResult
.
success
(
null
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取相册图片列表"
)
@RequestMapping
(
value
=
"/listPicAll"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:read')")
public
CommonResult
<
CommonPage
<
PmsAlbumPic
>>
listPicAll
(
@ApiParam
(
"相册id"
)
@RequestParam
(
required
=
false
)
Long
albumId
,
@RequestParam
(
required
=
false
)
Long
userId
,
@ApiParam
(
"相片类型1图片 2视频"
)
@RequestParam
(
required
=
false
)
Integer
pciType
,
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsAlbumPic
>
pmsAlbumPics
=
umsAlbumService
.
listPicAll
(
albumId
,
userId
,
pageNum
,
pageSize
,
pciType
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
pmsAlbumPics
));
}
@ApiOperation
(
value
=
"添加图片"
)
@RequestMapping
(
value
=
"/createAlbumPic"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:create')")
public
CommonResult
createAlbumPic
(
@Validated
@RequestBody
PmsAlbumPic
pmsAlbumPic
)
{
CommonResult
commonResult
;
int
count
=
umsAlbumService
.
createAlbumPic
(
pmsAlbumPic
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"更新相册"
)
@RequestMapping
(
value
=
"/updateAlbumPic/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:update')")
public
CommonResult
updateAlbumPic
(
@PathVariable
(
"id"
)
Long
id
,
@Validated
@RequestBody
PmsAlbumPic
pmsAlbumpic
)
{
CommonResult
commonResult
;
int
count
=
umsAlbumService
.
updateAlbumPic
(
pmsAlbumpic
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"删除图片(包含批量)"
)
@RequestMapping
(
value
=
"/deleteAlbumPic"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:delete')")
public
CommonResult
deleteAlbumPic
(
@ApiParam
(
"图片id集合"
)
@RequestParam
List
<
Long
>
ids
)
{
int
count
=
umsAlbumService
.
deleteAlbumPic
(
ids
);
if
(
count
>=
1
)
{
return
CommonResult
.
success
(
null
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsAreaController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
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.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 区域三级联动
*/
@RestController
@Api
(
tags
=
"区域管理"
)
@RequestMapping
(
"/area"
)
public
class
PmsAreaController
{
@Resource
private
PmsAreaService
pmsAreaService
;
@ApiOperation
(
value
=
"省市区三级联动"
)
@RequestMapping
(
value
=
"/getArea"
,
method
=
RequestMethod
.
GET
)
// //@PreAuthorize("hasAuthority('pms:album:read')")
public
CommonResult
<
List
<
PmsArea
>>
getArea
(
@ApiParam
(
"父级id"
)
@RequestParam
Long
parentId
)
{
return
CommonResult
.
success
(
pmsAreaService
.
getArea
(
parentId
));
}
@ApiOperation
(
value
=
"创建"
)
@PostMapping
public
CommonResult
createArea
(
@RequestBody
PmsArea
area
){
pmsAreaService
.
createArea
(
area
);
return
CommonResult
.
success
(
"创建成功"
);
}
@ApiOperation
(
value
=
"删除"
)
@DeleteMapping
(
value
=
"{id}"
)
public
CommonResult
deleteArea
(
@PathVariable
Long
id
){
pmsAreaService
.
deleteArea
(
id
);
return
CommonResult
.
success
(
"删除成功"
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsBrandController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.PmsBrandParam
;
import
com.macro.mall.dto.PmsBrandResult
;
import
com.macro.mall.model.PmsBrand
;
import
com.macro.mall.model.PmsBrandLog
;
import
com.macro.mall.service.PmsBrandService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 品牌功能Controller
* Created by macro on 2018/4/26.
*/
@Controller
@Api
(
tags
=
"商品品牌管理"
,
description
=
"商品品牌管理"
)
@RequestMapping
(
"/brand"
)
public
class
PmsBrandController
{
@Resource
private
PmsBrandService
brandService
;
@ApiOperation
(
value
=
"获取全部品牌列表"
)
@RequestMapping
(
value
=
"/listAll"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
<
List
<
PmsBrand
>>
getList
()
{
return
CommonResult
.
success
(
brandService
.
listAllBrand
());
}
@ApiOperation
(
value
=
"添加品牌"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:create')")
public
CommonResult
create
(
@Validated
@RequestBody
PmsBrandParam
pmsBrand
,
BindingResult
result
)
{
CommonResult
commonResult
;
int
count
=
brandService
.
createBrand
(
pmsBrand
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"更新品牌"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:update')")
public
CommonResult
update
(
@PathVariable
(
"id"
)
Long
id
,
@Validated
@RequestBody
PmsBrandParam
pmsBrandParam
,
BindingResult
result
)
{
CommonResult
commonResult
;
int
count
=
brandService
.
updateBrand
(
id
,
pmsBrandParam
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"删除品牌"
)
@RequestMapping
(
value
=
"/delete/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:delete')")
public
CommonResult
delete
(
@PathVariable
(
"id"
)
Long
id
)
{
int
count
=
brandService
.
deleteBrand
(
id
);
if
(
count
==
1
)
{
return
CommonResult
.
success
(
null
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"根据品牌名称分页获取品牌列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
<
CommonPage
<
PmsBrandResult
>>
getList
(
@ApiParam
(
"品牌名称"
)
@RequestParam
(
required
=
false
)
String
keyword
,
@ApiParam
(
"商家名称"
)
@RequestParam
(
required
=
false
)
String
mchtName
,
@ApiParam
(
"审核状态0待审核 1审核通过 2 审核失败 3驳回"
)
@RequestParam
(
required
=
false
)
String
auditStatus
,
@ApiParam
(
"商家id"
)
@RequestParam
(
required
=
false
)
Long
mchtId
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
)
{
List
<
PmsBrandResult
>
brandList
=
brandService
.
listBrand
(
keyword
,
pageNum
,
pageSize
,
mchtId
,
mchtName
,
auditStatus
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
brandList
));
}
@ApiOperation
(
value
=
"根据编号查询品牌信息"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
<
PmsBrand
>
getItem
(
@PathVariable
(
"id"
)
Long
id
)
{
return
CommonResult
.
success
(
brandService
.
getBrand
(
id
));
}
@ApiOperation
(
value
=
"批量删除品牌"
)
@RequestMapping
(
value
=
"/delete/batch"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:delete')")
public
CommonResult
deleteBatch
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
int
count
=
brandService
.
deleteBrand
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"批量更新显示状态"
)
@RequestMapping
(
value
=
"/update/showStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:update')")
public
CommonResult
updateShowStatus
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
,
@RequestParam
(
"showStatus"
)
Integer
showStatus
)
{
int
count
=
brandService
.
updateShowStatus
(
ids
,
showStatus
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"批量更新厂家制造商状态"
)
@RequestMapping
(
value
=
"/update/factoryStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:update')")
public
CommonResult
updateFactoryStatus
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
,
@RequestParam
(
"factoryStatus"
)
Integer
factoryStatus
)
{
int
count
=
brandService
.
updateFactoryStatus
(
ids
,
factoryStatus
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取品牌日志数据"
)
@RequestMapping
(
value
=
"/brandLogList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
<
CommonPage
<
PmsBrandLog
>>
brandLogList
(
@ApiParam
(
"品牌id"
)
@RequestParam
Long
brandId
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
)
{
List
<
PmsBrandLog
>
brandList
=
brandService
.
brandLogList
(
brandId
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
brandList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsCommentController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.CommentResult
;
import
com.macro.mall.dto.PmsCommentQueryParam
;
import
com.macro.mall.dto.PmsCommentReplayParam
;
import
com.macro.mall.model.PmsComment
;
import
com.macro.mall.service.PmsCommentService
;
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
org.springframework.web.multipart.MultipartFile
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
@Controller
@Api
(
tags
=
"商品评价管理"
,
description
=
"商品评价管理"
)
@RequestMapping
(
"/comment"
)
public
class
PmsCommentController
{
@Resource
private
PmsCommentService
pmsCommentService
;
@ApiOperation
(
value
=
"评论列表"
)
@RequestMapping
(
value
=
"/listAll"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
CommentResult
>>
getList
(
@ModelAttribute
PmsCommentQueryParam
commentQueryParam
,
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
CommentResult
>
pmsComments
=
pmsCommentService
.
listAll
(
commentQueryParam
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
pmsComments
));
}
@ApiOperation
(
value
=
"删除评论"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestParam
String
ids
)
{
int
count
=
pmsCommentService
.
deleteComment
(
ids
);
if
(
count
==
1
)
{
return
CommonResult
.
success
(
null
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"审核评论"
)
@RequestMapping
(
value
=
"/auditComment"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
auditComment
(
@ApiParam
(
"评论id,多个以逗号隔开"
)
@RequestParam
String
ids
,
@ApiParam
(
"审核状态 0未审核 1审核成功 2审核失败"
)
@RequestParam
Integer
auditStatus
)
{
int
count
=
pmsCommentService
.
auditComment
(
ids
,
auditStatus
);
if
(
count
==
1
)
{
return
CommonResult
.
success
(
null
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"评论回复"
)
@RequestMapping
(
value
=
"/replyComment"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
replyComment
(
@ModelAttribute
PmsCommentReplayParam
replayParam
)
{
int
count
=
pmsCommentService
.
replyComment
(
replayParam
);
if
(
count
==
1
)
{
return
CommonResult
.
success
(
null
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"评论信息"
)
@RequestMapping
(
value
=
"/getCommentInfo"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommentResult
>
getCommentInfo
(
@ApiParam
(
"评论id"
)
@RequestParam
Long
id
)
{
CommentResult
commentResult
=
pmsCommentService
.
getCommentInfo
(
id
);
return
CommonResult
.
success
(
commentResult
);
}
// @ApiOperation(value = "评论导入")
// @RequestMapping(value = "/importComment", method = RequestMethod.POST)
// @ResponseBody
public
CommonResult
importComment
(
@RequestParam
(
"file"
)
MultipartFile
file
,
HttpServletRequest
req
)
{
int
count
=
pmsCommentService
.
importComment
(
file
,
req
);
if
(
count
==
1
)
{
return
CommonResult
.
success
(
null
);
}
else
{
return
CommonResult
.
failed
();
}
}
// @ApiOperation(value = "评论导出")
// @RequestMapping(value = "/exportComment", method = RequestMethod.POST)
// @ResponseBody
public
CommonResult
exportComment
(
@ApiParam
(
"导出的id,多个以逗号隔开"
)
@RequestParam
(
required
=
false
)
String
ids
,
@ApiParam
(
"商家id"
)
@RequestParam
(
required
=
false
)
Long
mchtId
,
HttpServletResponse
res
)
{
int
count
=
pmsCommentService
.
exportComment
(
ids
,
mchtId
,
res
);
if
(
count
==
1
)
{
return
CommonResult
.
success
(
null
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeCategoryController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsProductAttributeCategory
;
import
com.macro.mall.model.dto.PmsProductAttributeCategoryItem
;
import
com.macro.mall.service.quanxing.PmsProductAttributeCategoryService
;
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
java.util.List
;
/**
* 商品属性分类Controller
* Created by macro on 2018/4/26.
*/
@Controller
@Api
(
tags
=
"权星后台_商品分类相关接口"
,
description
=
"商品属性分类管理"
)
@RequestMapping
(
"/productAttribute/category"
)
public
class
PmsProductAttributeCategoryController
{
@Autowired
private
PmsProductAttributeCategoryService
productAttributeCategoryService
;
@ApiOperation
(
"添加商品属性分类"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@ApiParam
(
"类型名称"
)
@RequestParam
String
name
,
@ApiParam
(
"当前级id,一级直接传"
)
@RequestParam
Long
id
,
@ApiParam
(
"排序值"
)
@RequestParam
(
required
=
false
)
Integer
sort
)
{
int
count
=
productAttributeCategoryService
.
create
(
name
,
id
,
sort
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"修改商品属性分类"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@PathVariable
Long
id
,
@RequestBody
PmsProductAttributeCategory
pmsProductAttributeCategory
)
{
int
count
=
productAttributeCategoryService
.
update
(
id
,
pmsProductAttributeCategory
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"删除单个商品属性分类"
)
@RequestMapping
(
value
=
"/delete/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
delete
(
@PathVariable
Long
id
)
{
int
count
=
productAttributeCategoryService
.
delete
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"获取单个商品属性分类信息"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
PmsProductAttributeCategory
>
getItem
(
@PathVariable
Long
id
)
{
PmsProductAttributeCategory
productAttributeCategory
=
productAttributeCategoryService
.
getItem
(
id
);
return
CommonResult
.
success
(
productAttributeCategory
);
}
@ApiOperation
(
"分页获取所有商品属性分类"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsProductAttributeCategory
>>
getList
(
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
@ApiParam
(
"父级id,没有默认0"
)
@RequestParam
Long
parentId
)
{
List
<
PmsProductAttributeCategory
>
productAttributeCategoryList
=
productAttributeCategoryService
.
getList
(
pageSize
,
pageNum
,
parentId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
productAttributeCategoryList
));
}
@ApiOperation
(
"获取所有商品属性分类及其下属性"
)
@RequestMapping
(
value
=
"/list/withAttr"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
PmsProductAttributeCategoryItem
>>
getListWithAttr
()
{
List
<
PmsProductAttributeCategoryItem
>
productAttributeCategoryResultList
=
productAttributeCategoryService
.
getListWithAttr
();
return
CommonResult
.
success
(
productAttributeCategoryResultList
);
}
@ApiOperation
(
"权星获取所有商品分类 (默认不传分页参数则不分页查询)"
)
@RequestMapping
(
value
=
"/getAttributeCategoryList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
getAttributeCategoryList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"page"
)
Integer
page
,
@ApiParam
(
"大小"
)
@RequestParam
(
"size"
)
Integer
size
,
@ApiParam
(
"非必传 不传父级id 则查所有分类"
)
@RequestParam
(
"parentId"
)
Long
parentId
){
return
CommonResult
.
success
(
this
.
productAttributeCategoryService
.
getAttributeCategoryList
(
page
,
size
,
parentId
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.PmsAttributeResult
;
import
com.macro.mall.dto.PmsProductAttributeParam
;
import
com.macro.mall.dto.ProductAttrInfo
;
import
com.macro.mall.model.PmsProductAttribute
;
import
com.macro.mall.service.PmsProductAttributeService
;
import
io.swagger.annotations.*
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 商品属性管理Controller
* Created by macro on 2018/4/26.
*/
@Controller
@Api
(
tags
=
"商品属性管理"
,
description
=
"商品属性管理"
)
@RequestMapping
(
"/productAttribute"
)
public
class
PmsProductAttributeController
{
@Resource
private
PmsProductAttributeService
productAttributeService
;
/*@ApiOperation("根据分类查询属性列表或参数列表")
@ApiImplicitParams({@ApiImplicitParam(name = "type", value = "0表示属性,1表示参数", required = true, paramType = "query", dataType = "integer")})
@RequestMapping(value = "/list/{cid}", method = RequestMethod.GET)
@ResponseBody
public CommonResult<CommonPage<PmsProductAttribute>> getList(@PathVariable Long cid,
@RequestParam(value = "type") Integer type,
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
List<PmsProductAttribute> productAttributeList = productAttributeService.getList(cid, type, pageSize, pageNum);
return CommonResult.success(CommonPage.restPage(productAttributeList));
}*/
@ApiOperation
(
"属性列表"
)
// @ApiImplicitParams({@ApiImplicitParam(name = "type", value = "0表示属性,1表示参数", required = true, paramType = "query", dataType = "integer")})
@RequestMapping
(
value
=
"/attributList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsAttributeResult
>>
attributList
(
@ApiParam
(
"属性分组id"
)
@RequestParam
(
required
=
false
)
Long
cid
,
@ApiParam
(
"属性类型id"
)
@RequestParam
(
required
=
false
)
Long
attributeTypeId
,
@ApiParam
(
"类型"
)
@RequestParam
(
required
=
false
)
Integer
type
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsAttributeResult
>
pmsAttributeResults
=
productAttributeService
.
attributList
(
cid
,
type
,
pageSize
,
pageNum
,
attributeTypeId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
pmsAttributeResults
));
}
@ApiOperation
(
"添加商品属性信息"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
PmsProductAttribute
pmsProductAttribute
)
{
int
count
=
productAttributeService
.
create
(
pmsProductAttribute
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"修改商品属性信息"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@PathVariable
Long
id
,
@RequestBody
PmsProductAttributeParam
productAttributeParam
,
BindingResult
bindingResult
)
{
int
count
=
productAttributeService
.
update
(
id
,
productAttributeParam
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"移动商品属性信息"
)
@RequestMapping
(
value
=
"/updateMove"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@ApiParam
(
"属性id"
)
@RequestParam
Long
id
,
@ApiParam
(
"属性分组id"
)
@RequestParam
Long
attributeGroupId
)
{
int
count
=
productAttributeService
.
updateMove
(
id
,
attributeGroupId
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"查询单个商品属性"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
PmsProductAttribute
>
getItem
(
@PathVariable
Long
id
)
{
PmsProductAttribute
productAttribute
=
productAttributeService
.
getItem
(
id
);
return
CommonResult
.
success
(
productAttribute
);
}
@ApiOperation
(
"批量删除商品属性"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
int
count
=
productAttributeService
.
delete
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"根据商品分类的id获取商品属性及属性分类"
)
@RequestMapping
(
value
=
"/attrInfo/{productCategoryId}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
ProductAttrInfo
>>
getAttrInfo
(
@PathVariable
Long
productCategoryId
)
{
List
<
ProductAttrInfo
>
productAttrInfoList
=
productAttributeService
.
getProductAttrInfo
(
productCategoryId
);
return
CommonResult
.
success
(
productAttrInfoList
);
}
@ApiOperation
(
"创建商品手动添加属性"
)
@RequestMapping
(
value
=
"/saveManualAttribute"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
PmsProductAttribute
>>
saveManualAttribute
(
@RequestBody
List
<
PmsProductAttribute
>
pmsProductAttributes
)
{
return
CommonResult
.
success
(
productAttributeService
.
saveManualAttribute
(
pmsProductAttributes
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeGroupController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.PmsProductAttributeGroupParam
;
import
com.macro.mall.model.AttributeGroupVo
;
import
com.macro.mall.model.PmsAttributeGroupResult
;
import
com.macro.mall.model.PmsProductAttributeGroup
;
import
com.macro.mall.service.ProductAttributeGroupService
;
import
io.swagger.annotations.*
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 创建商品参数分组
*/
@Controller
@Api
(
tags
=
"商品参数管理"
,
description
=
"商品参数管理"
)
@RequestMapping
(
"/productAttributeGroup"
)
public
class
PmsProductAttributeGroupController
{
@Resource
private
ProductAttributeGroupService
productAttributeGroupService
;
@ApiOperation
(
"参数列表"
)
// @ApiImplicitParams({@ApiImplicitParam(name = "type", value = "0表示属性,1表示参数", required = true, paramType = "query", dataType = "integer")})
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsAttributeGroupResult
>>
getList
(
@ApiParam
(
"类型属性id"
)
@RequestParam
(
required
=
false
)
Long
cid
,
@ApiParam
(
"类型id"
)
@RequestParam
(
required
=
false
)
Long
attributeCategoryId
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsAttributeGroupResult
>
pmsAttributeGroupResults
=
productAttributeGroupService
.
getList
(
cid
,
pageSize
,
pageNum
,
attributeCategoryId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
pmsAttributeGroupResults
));
}
@ApiOperation
(
"添加商品分组"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
PmsProductAttributeGroupParam
pmsProductAttributeGroupParam
)
{
int
count
=
productAttributeGroupService
.
create
(
pmsProductAttributeGroupParam
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"修改商品属性信息"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@PathVariable
Long
id
,
@RequestBody
PmsProductAttributeGroupParam
pmsProductAttributeGroupParam
,
BindingResult
bindingResult
)
{
int
count
=
productAttributeGroupService
.
update
(
id
,
pmsProductAttributeGroupParam
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"移动分组"
)
@RequestMapping
(
value
=
"/updateMoveGroup"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateMoveGroup
(
@PathVariable
Long
id
,
@ApiParam
(
"移动的目标类型分类id"
)
@RequestParam
Long
tagAttributeCategoryId
,
@ApiParam
(
"移动的目标类型(属性)id"
)
@RequestParam
Long
tagAttributeTypeId
)
{
int
count
=
productAttributeGroupService
.
updateMoveGroup
(
id
,
tagAttributeCategoryId
,
tagAttributeTypeId
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"查询单个商品属性"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
PmsProductAttributeGroup
>
getParamGroup
(
@PathVariable
Long
id
)
{
PmsProductAttributeGroup
productAttributeGroup
=
productAttributeGroupService
.
getParamGroup
(
id
);
return
CommonResult
.
success
(
productAttributeGroup
);
}
@ApiOperation
(
"批量删除商品属性"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestBody
List
<
Long
>
ids
)
{
int
count
=
productAttributeGroupService
.
delete
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"获取品类对应属性参数"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"cid"
,
value
=
"类目id"
,
required
=
true
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"mchtId"
,
value
=
"商家id"
,
dataType
=
"long"
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"type"
,
value
=
"属性的类型;0->规格;1->参数;3->关键属性 4->非关键属性"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"query"
),
})
@RequestMapping
(
value
=
"/list/params"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
AttributeGroupVo
>>
paramsList
(
Long
cid
,
Integer
type
,
Long
mchtId
)
{
List
<
AttributeGroupVo
>
list
=
productAttributeGroupService
.
paramsList
(
cid
,
type
,
mchtId
);
return
CommonResult
.
success
(
list
,
""
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsProductAttributeTypeController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsAttributeTypeReulst
;
import
com.macro.mall.model.PmsProductAttributeType
;
import
com.macro.mall.service.PmsProductAttributeTypeService
;
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
=
"类型(属性)管理"
)
@RequestMapping
(
"/productAttribute/type"
)
public
class
PmsProductAttributeTypeController
{
@Resource
private
PmsProductAttributeTypeService
pmsProductAttributeTypeService
;
@ApiOperation
(
"添加商品属性分类"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@ApiParam
(
"类型名称,多个以逗号隔开"
)
@RequestParam
String
names
,
@ApiParam
(
"属性类型分类id"
)
@RequestParam
Long
attributeCategoryId
)
{
int
count
=
pmsProductAttributeTypeService
.
create
(
names
,
attributeCategoryId
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"分页获取所有商品属性分类"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsAttributeTypeReulst
>>
getList
(
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
,
@ApiParam
(
"父级id,没有默认0"
)
@RequestParam
Long
attributeCategoryId
)
{
List
<
PmsAttributeTypeReulst
>
productAttributeCategoryList
=
pmsProductAttributeTypeService
.
getList
(
pageSize
,
pageNum
,
attributeCategoryId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
productAttributeCategoryList
));
}
@ApiOperation
(
"修改商品类型(属性)"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@ModelAttribute
PmsProductAttributeType
pmsProductAttributeType
)
{
int
count
=
pmsProductAttributeTypeService
.
update
(
pmsProductAttributeType
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"删除商品类型(属性)"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestBody
List
<
Long
>
ids
)
{
int
count
=
pmsProductAttributeTypeService
.
delete
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"商品类型(属性)编辑信息"
)
@RequestMapping
(
value
=
"/updateInfo/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:labelGroup:read')")
public
CommonResult
<
PmsProductAttributeType
>
getUpdateInfo
(
@PathVariable
Long
id
)
{
PmsProductAttributeType
pmsProductAttributeType
=
pmsProductAttributeTypeService
.
getUpdateInfo
(
id
);
return
CommonResult
.
success
(
pmsProductAttributeType
);
}
@ApiOperation
(
"权星后台根据分类id 获取类型属性以及规格"
)
@RequestMapping
(
value
=
"/getAttributeType"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
getAttributeType
(
Long
productAttributeTypeId
){
return
CommonResult
.
success
(
this
.
pmsProductAttributeTypeService
.
getAttributeType
(
productAttributeTypeId
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsProductCategoryController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.bo.CategoryHistoryVo
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.CategoryCommonResult
;
import
com.macro.mall.dto.PmsProductCategoryParam
;
import
com.macro.mall.model.PmsProductCategory
;
import
com.macro.mall.service.PmsProductCategoryService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 商品分类模块Controller
* Created by macro on 2018/4/26.
*/
@Controller
@Api
(
tags
=
"商品分类管理"
,
description
=
"商品分类管理"
)
@RequestMapping
public
class
PmsProductCategoryController
{
@Resource
private
PmsProductCategoryService
productCategoryService
;
@ApiOperation
(
"添加产品分类"
)
@RequestMapping
(
value
=
"/productCategory/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:productCategory:create')")
public
CommonResult
create
(
@Validated
@RequestBody
PmsProductCategoryParam
pmsProductCategoryParam
,
BindingResult
result
)
{
int
count
=
productCategoryService
.
create
(
pmsProductCategoryParam
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"修改商品分类"
)
@RequestMapping
(
value
=
"/productCategory/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:productCategory:update')")
public
CommonResult
update
(
@PathVariable
Long
id
,
@Validated
@RequestBody
PmsProductCategoryParam
pmsProductCategoryParam
,
BindingResult
result
)
{
int
count
=
productCategoryService
.
update
(
id
,
pmsProductCategoryParam
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"分页查询商品分类"
)
@RequestMapping
(
value
=
"/productCategory/list/{parentId}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:productCategory:read')")
public
CommonResult
<
CommonPage
<
PmsProductCategory
>>
getList
(
@PathVariable
Long
parentId
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@ApiParam
(
"显示状态 0不显示 1显示"
)
@RequestParam
(
required
=
false
)
Integer
showStatus
)
{
List
<
PmsProductCategory
>
productCategoryList
=
productCategoryService
.
getList
(
parentId
,
pageSize
,
pageNum
,
showStatus
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
productCategoryList
));
}
@ApiOperation
(
"根据id获取商品分类"
)
@RequestMapping
(
value
=
"/productCategory/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:productCategory:read')")
public
CommonResult
<
PmsProductCategoryParam
>
getItem
(
@PathVariable
Long
id
)
{
PmsProductCategoryParam
productCategory
=
productCategoryService
.
getItem
(
id
);
return
CommonResult
.
success
(
productCategory
);
}
@ApiOperation
(
"删除商品分类"
)
@RequestMapping
(
value
=
"/productCategory/delete/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:productCategory:delete')")
public
CommonResult
delete
(
@PathVariable
Long
id
)
{
int
count
=
productCategoryService
.
delete
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
// @ApiOperation("修改导航栏显示状态")
// @RequestMapping(value = "/update/navStatus", method = RequestMethod.POST)
// @ResponseBody
// //@PreAuthorize("hasAuthority('pms:productCategory:update')")
// public CommonResult updateNavStatus(@RequestParam("ids") List<Long> ids, @RequestParam("navStatus") Integer navStatus) {
// int count = productCategoryService.updateNavStatus(ids, navStatus);
// if (count > 0) {
// return CommonResult.success(count);
// } else {
// return CommonResult.failed();
// }
// }
@ApiOperation
(
"修改显示状态"
)
@RequestMapping
(
value
=
"/productCategory/update/showStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:productCategory:update')")
public
CommonResult
updateShowStatus
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
,
@RequestParam
(
"showStatus"
)
Integer
showStatus
)
{
int
count
=
productCategoryService
.
updateShowStatus
(
ids
,
showStatus
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"查询所有一级分类及子分类"
)
@RequestMapping
(
value
=
"/api/z/productCategory/list/withChildren"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:productCategory:read')")
public
CommonResult
<
List
<
PmsProductCategory
>>
listWithChildren
(
@RequestParam
(
value
=
"parentId"
,
defaultValue
=
"0"
)
Long
parentId
)
{
List
<
PmsProductCategory
>
list
=
productCategoryService
.
listWithChildren
(
parentId
);
return
CommonResult
.
success
(
list
);
}
@ApiOperation
(
"查询添加商品最近历史使用数据"
)
@RequestMapping
(
value
=
"/productCategory/listCategoryHistory"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
getListHistory
(
@ApiParam
(
"用户id"
)
@RequestParam
(
required
=
false
)
Long
userId
)
{
List
<
CategoryHistoryVo
>
history
=
productCategoryService
.
getListHistory
(
userId
);
return
CommonResult
.
success
(
history
,
""
);
}
@ApiOperation
(
"转移分类商品"
)
@RequestMapping
(
value
=
"/productCategory/updateMoveCategoryProduct"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateMoveCategoryProduct
(
@ApiParam
(
"来源类目id1"
)
@RequestParam
(
required
=
false
)
Long
sourceId1
,
@ApiParam
(
"来源类目id2"
)
@RequestParam
(
required
=
false
)
Long
sourceId2
,
@ApiParam
(
"来源类目id3"
)
@RequestParam
(
required
=
false
)
Long
sourceId3
,
@ApiParam
(
"目标类目id1"
)
@RequestParam
(
required
=
false
)
Long
tagId1
,
@ApiParam
(
"目标类目id2"
)
@RequestParam
(
required
=
false
)
Long
tagId2
,
@ApiParam
(
"目标类目id3"
)
@RequestParam
(
required
=
false
)
Long
tagId3
)
{
int
count
=
productCategoryService
.
updateMoveCategoryProduct
(
sourceId1
,
sourceId2
,
sourceId3
,
tagId1
,
tagId2
,
tagId3
,
null
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
(
"没有可转出的商品"
);
}
}
@ApiOperation
(
"获取商家经营的1,2,3三级类目"
)
@RequestMapping
(
value
=
"/productCategory/getMchtBusiiCategoryList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
CategoryCommonResult
>>
getMchtBusiiCategoryList
(
@ApiParam
(
"商家id"
)
@RequestParam
Long
mchtId
)
{
List
<
CategoryCommonResult
>
categoryCommonResults
=
productCategoryService
.
getMchtBusiiCategoryList
(
mchtId
);
return
CommonResult
.
success
(
categoryCommonResults
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsProductController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.PmsProductRequestParam
;
import
com.macro.mall.model.PmsProduct
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.quanxing.PmsProductDto
;
import
com.macro.mall.model.dto.quanxing.common.BatchOperationDto
;
import
com.macro.mall.service.product.PmsProductService
;
import
io.swagger.annotations.Api
;
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
;
/**
* 商品管理Controller
* Created by macro on 2018/4/26.
*/
@Controller
@Api
(
tags
=
"权星后台_商品相关接口"
,
description
=
"商品管理"
)
@RequestMapping
(
"/product"
)
public
class
PmsProductController
{
@Resource
private
PmsProductService
productService
;
@ApiOperation
(
"权星后台_创建商品"
)
@RequestMapping
(
value
=
"/addProduct"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
addProduct
(
@RequestBody
PmsProductRequestParam
pmsProductRequestParam
){
ResultMsg
res
=
this
.
productService
.
addProduct
(
pmsProductRequestParam
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星后台_获取商品信息根据商品id"
)
@RequestMapping
(
value
=
"/getProductInfo"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:product:read')")
public
CommonResult
<
PmsProductRequestParam
>
getProductInfo
(
@ApiParam
(
"商品Id"
)
@RequestParam
(
value
=
"id"
)
Long
id
)
{
PmsProductRequestParam
pmsProductRequestParam
=
productService
.
getProductById
(
id
);
return
CommonResult
.
success
(
pmsProductRequestParam
);
}
@ApiOperation
(
"权星后台_修改商品后保存操作 如果sku有变动则需传入pmsProductSkuValueList以及pmsSkuStockList 没有变动则不需传"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:product:update')")
public
CommonResult
update
(
@RequestBody
PmsProductRequestParam
pmsProductRequestParam
)
{
ResultMsg
res
=
productService
.
updateProduct
(
pmsProductRequestParam
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星后台_商品分页查询"
)
@ResponseBody
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
<
CommonPage
<
PmsProductDto
>>
getPageList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"page"
)
Integer
page
,
@ApiParam
(
"每页大小"
)
@RequestParam
(
"size"
)
Integer
size
,
@ApiParam
(
"模糊查询商品名称 "
)
@RequestParam
(
"name"
)
String
name
,
@ApiParam
(
"模糊查询商品供应商名称 "
)
@RequestParam
(
"mchtName"
)
String
mchtName
,
@ApiParam
(
"审核状态 0待审核 1审核通过 2审核未通过 "
)
@RequestParam
(
"verifyStatus"
)
Integer
verifyStatus
,
@ApiParam
(
"商品供应商id "
)
@RequestParam
(
name
=
"mchtId"
,
required
=
false
)
Long
mchtId
){
return
CommonResult
.
success
(
CommonPage
.
restPage
(
this
.
productService
.
getPageList
(
page
,
size
,
name
,
verifyStatus
,
mchtName
,
mchtId
)));
}
@ApiOperation
(
"权星后台_根据商品id修改一条商品数据"
)
@RequestMapping
(
value
=
"/updateOneById"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateOneById
(
@ApiParam
(
"商品对象,传入Id,以及对应的要修改的值.例如上架状态:0->下架;1->上架' 传入0为下架操作"
)
@RequestBody
PmsProduct
pmsProduct
){
ResultMsg
res
=
this
.
productService
.
updateOneById
(
pmsProduct
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星后台_传入商品ids集合 批量删除"
)
@RequestMapping
(
value
=
"/batchOperationByDelete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
batchOperationByDelete
(
@ApiParam
(
"接收对象"
)
@RequestBody
BatchOperationDto
batchOperationDto
){
ResultMsg
res
=
this
.
productService
.
batchOperationByDelete
(
batchOperationDto
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星后台_传入商品ids集合 批量上架或者下架"
)
@RequestMapping
(
value
=
"/batchOperationByPublishStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
batchOperationByPublishStatus
(
@ApiParam
(
"接收对象"
)
@RequestBody
BatchOperationDto
batchOperationDto
){
ResultMsg
res
=
this
.
productService
.
batchOperationByPublishStatus
(
batchOperationDto
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsProductLabelController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.PmsProductLabelGroupParam
;
import
com.macro.mall.dto.PmsProductLabelGroupResult
;
import
com.macro.mall.dto.PmsProductLabelResult
;
import
com.macro.mall.model.PmsProductLabel
;
import
com.macro.mall.model.PmsProductLabelGroup
;
import
com.macro.mall.service.PmsProductLabelGroupService
;
import
com.macro.mall.service.PmsProductLabelService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 商品标签Controller
* Created by macro on 2018/4/26.
*/
@Controller
@Api
(
tags
=
"商品标签管理"
,
description
=
"商品标签管理"
)
@RequestMapping
(
"/label"
)
public
class
PmsProductLabelController
{
@Resource
private
PmsProductLabelGroupService
pmsProductLabelGroupService
;
@Resource
private
PmsProductLabelService
pmsProductLabelService
;
@ApiOperation
(
value
=
"获取平台标签列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsProductLabelGroup
>>
getList
(
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
)
{
List
<
PmsProductLabelGroup
>
list
=
pmsProductLabelGroupService
.
list
(
name
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@ApiOperation
(
value
=
"获取商家标签列表"
)
@RequestMapping
(
value
=
"/getMchtLabelList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsProductLabelGroupResult
>>
getMchtLabelList
(
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"mchtId"
,
required
=
false
)
Long
mchtId
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
)
{
List
<
PmsProductLabelGroupResult
>
list
=
pmsProductLabelGroupService
.
getMchtLabelList
(
name
,
pageNum
,
pageSize
,
mchtId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@ApiOperation
(
"创建标签组"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:labelGroup:create')")
public
CommonResult
create
(
@Validated
@RequestBody
PmsProductLabelGroupParam
groupParam
,
BindingResult
result
)
{
CommonResult
commonResult
;
int
count
=
pmsProductLabelGroupService
.
createLabelGroup
(
groupParam
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
"根据标签组id获取标签组编辑信息"
)
@RequestMapping
(
value
=
"/updateInfo/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:labelGroup:read')")
public
CommonResult
<
PmsProductLabelGroupParam
>
getUpdateInfo
(
@PathVariable
Long
id
)
{
PmsProductLabelGroupParam
pmsProductLabelGroupParam
=
pmsProductLabelGroupService
.
getUpdateInfo
(
id
);
return
CommonResult
.
success
(
pmsProductLabelGroupParam
);
}
@ApiOperation
(
"批量修改删除状态"
)
@RequestMapping
(
value
=
"/update/deleteStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:labelGroup:delete')")
public
CommonResult
updateDeleteStatus
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
,
@RequestParam
(
"deleteStatus"
)
Integer
deleteStatus
)
{
int
count
=
pmsProductLabelGroupService
.
updateDeleteStatus
(
ids
,
deleteStatus
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"更新标签"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:labelGroup:update')")
public
CommonResult
update
(
@PathVariable
(
"id"
)
Long
id
,
@Validated
@RequestBody
PmsProductLabelGroupParam
groupParam
,
BindingResult
result
)
{
CommonResult
commonResult
;
int
count
=
pmsProductLabelGroupService
.
updateLabelGroup
(
id
,
groupParam
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"创建商品:获取平台标签"
)
@RequestMapping
(
value
=
"/getLabelList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
PmsProductLabelResult
>>
getLabelList
(
@ApiParam
(
"标签组类型 1平台标签 2商家标签"
)
@RequestParam
(
required
=
false
)
Integer
type
,
@ApiParam
(
"商家id"
)
@RequestParam
(
required
=
false
)
Long
mchtId
)
{
List
<
PmsProductLabelResult
>
list
=
pmsProductLabelGroupService
.
getLabelList
(
type
,
mchtId
);
return
CommonResult
.
success
(
list
);
}
@ApiOperation
(
value
=
"创建商品:获取商家标签列表"
)
@RequestMapping
(
value
=
"/getProductLableList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsProductLabelGroup
>>
getProductLableList
(
@RequestParam
Long
mchtId
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
)
{
List
<
PmsProductLabelGroup
>
list
=
pmsProductLabelGroupService
.
getProductLableGroupList
(
pageNum
,
pageSize
,
mchtId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@ApiOperation
(
value
=
"获取商家所有子标签"
)
@RequestMapping
(
value
=
"/getProductSubLableList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsProductLabel
>>
getProductSubLableList
(
@RequestParam
Long
mchtId
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
)
{
List
<
PmsProductLabel
>
list
=
pmsProductLabelService
.
getProductSubLableList
(
pageNum
,
pageSize
,
mchtId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsProductMchtCategoryController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsProductMchtCategory
;
import
com.macro.mall.service.PmsProductMchtCategoryService
;
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
=
"商家自有分类设定"
)
@RequestMapping
(
"/mchtCagegory"
)
public
class
PmsProductMchtCategoryController
{
@Resource
private
PmsProductMchtCategoryService
productMchtCategoryService
;
@ApiOperation
(
value
=
"自有分类列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsProductMchtCategory
>>
getList
(
@ApiParam
(
"父级品类id"
)
@RequestParam
(
required
=
false
)
Long
parentId
,
@ApiParam
(
"商家id,平台的默认不传"
)
@RequestParam
(
required
=
false
)
Long
mchtId
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
)
{
List
<
PmsProductMchtCategory
>
list
=
productMchtCategoryService
.
list
(
pageNum
,
pageSize
,
parentId
,
mchtId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@ApiOperation
(
value
=
"添加自有分类"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
PmsProductMchtCategory
pmsProductMchtCategory
)
{
int
count
=
productMchtCategoryService
.
create
(
pmsProductMchtCategory
);
CommonResult
commonResult
;
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
"批量修改删除状态"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:labelGroup:delete')")
public
CommonResult
delete
(
@RequestBody
List
<
Long
>
ids
)
{
int
count
=
productMchtCategoryService
.
delete
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"获取品类编辑编辑信息"
)
@RequestMapping
(
value
=
"/updateInfo"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:labelGroup:read')")
public
CommonResult
<
PmsProductMchtCategory
>
getUpdateInfo
(
@RequestParam
Long
id
)
{
PmsProductMchtCategory
mchtCategory
=
productMchtCategoryService
.
getUpdateInfo
(
id
);
return
CommonResult
.
success
(
mchtCategory
);
}
@ApiOperation
(
"获取品类编辑编辑信息"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:labelGroup:read')")
public
CommonResult
update
(
@RequestBody
PmsProductMchtCategory
pmsProductMchtCategory
)
{
int
count
=
productMchtCategoryService
.
update
(
pmsProductMchtCategory
);
CommonResult
commonResult
;
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
"移动商品"
)
@RequestMapping
(
value
=
"/updateMoveMchtPoruct"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:labelGroup:read')")
public
CommonResult
updateMoveMchtPoruct
(
@ApiParam
(
"商家id"
)
@RequestParam
(
required
=
false
)
Long
mchtId
,
@ApiParam
(
"来源自有分类id(选的最后一级)"
)
@RequestParam
Long
mchtCategoryId
,
@ApiParam
(
"目标自有分类id(选的最后一级)"
)
@RequestParam
Long
tagMchtCategoryId
)
{
int
count
=
productMchtCategoryService
.
updateMoveMchtPoruct
(
mchtId
,
mchtCategoryId
,
tagMchtCategoryId
);
CommonResult
commonResult
;
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsProductRecommendController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.domain.vo.product.ProductRecommendVo
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.service.PmsProductRecommendService
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 商品推荐
* auth:chenwf
*/
@Controller
@Api
(
tags
=
"商品推荐管理"
,
description
=
"商品推荐管理"
)
@RequestMapping
(
"/recommend"
)
public
class
PmsProductRecommendController
{
@Resource
private
PmsProductRecommendService
PmsProductRecommendService
;
@ApiOperation
(
value
=
"商品推荐列表"
)
@RequestMapping
(
value
=
"/productRecommendList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
ProductRecommendVo
>>
productRecommendList
(
@RequestParam
(
value
=
"productId"
,
required
=
false
)
Long
productId
)
{
List
<
ProductRecommendVo
>
list
=
PmsProductRecommendService
.
productRecommendList
(
productId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsProductSynController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.service.synproduct.PmsProductBrandSynService
;
import
com.macro.mall.service.synproduct.PmsProductCategorySynService
;
import
com.macro.mall.service.synproduct.PmsProductIvInventorySynService
;
import
com.macro.mall.service.synproduct.PmsProductSynService
;
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.RestController
;
import
javax.annotation.Resource
;
@RestController
@Api
(
tags
=
"商品同步"
,
description
=
"商品同步"
)
@RequestMapping
(
"/proSyn"
)
public
class
PmsProductSynController
{
@Resource
private
PmsProductSynService
pmsProductSynService
;
@Resource
private
PmsProductBrandSynService
pmsProductBrandSynService
;
@Resource
private
PmsProductCategorySynService
pmsProductCategorySynService
;
@Resource
private
PmsProductIvInventorySynService
pmsProductIvInventorySynService
;
@ApiOperation
(
value
=
"商品同步"
)
@RequestMapping
(
value
=
"/test"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
syn
(){
String
result
=
pmsProductSynService
.
productSkuSyn
();
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"品牌同步"
)
@RequestMapping
(
value
=
"/brand"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
bandSyn
(){
String
result
=
pmsProductBrandSynService
.
productBrandSyn
();
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"商品类目同步"
)
@RequestMapping
(
value
=
"/category"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
categorySyn
(){
pmsProductCategorySynService
.
PmsProducCategory
();
return
null
;
}
@ApiOperation
(
value
=
"商品库存同步"
)
@RequestMapping
(
value
=
"/IvInventory"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
IvInventorySyn
(){
pmsProductIvInventorySynService
.
ProductIvInventorySyn
();
return
null
;
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsSkuStockController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsSkuStock
;
import
com.macro.mall.service.product.PmsSkuStockService
;
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
;
/**
* sku库存Controller
* Created by macro on 2018/4/27.
*/
@Controller
@Api
(
tags
=
"sku商品库存管理"
,
description
=
"sku商品库存管理"
)
@RequestMapping
(
"/sku"
)
public
class
PmsSkuStockController
{
@Resource
private
PmsSkuStockService
skuStockService
;
@ApiOperation
(
"根据商品编号及编号模糊搜索sku库存"
)
@RequestMapping
(
value
=
"/{pid}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
PmsSkuStock
>>
getList
(
@PathVariable
Long
pid
,
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
)
{
List
<
PmsSkuStock
>
skuStockList
=
skuStockService
.
getList
(
pid
,
keyword
);
return
CommonResult
.
success
(
skuStockList
);
}
@ApiOperation
(
"批量更新库存信息"
)
@RequestMapping
(
value
=
"/update/{pid}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@PathVariable
Long
pid
,
@RequestBody
List
<
PmsSkuStock
>
skuStockList
){
int
count
=
skuStockService
.
update
(
pid
,
skuStockList
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/PmsStallPositionManageController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.StallPositionManageList
;
import
com.macro.mall.dto.Vo.StallPositionManageVo
;
import
com.macro.mall.model.PmsStallArea
;
import
com.macro.mall.model.PmsStallPositionManage
;
import
com.macro.mall.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.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@Controller
@Api
(
tags
=
"档口位置管理"
,
description
=
"档口位置管理"
)
@RequestMapping
(
"/stall"
)
public
class
PmsStallPositionManageController
{
@Resource
private
PmsStallPositionManageService
pmsStallPositionManageService
;
@ApiOperation
(
value
=
"档口列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
// //@PreAuthorize("hasAuthority('pms:album:read')")
public
CommonResult
<
CommonPage
<
StallPositionManageList
>>
list
(
@ApiParam
(
"排序类型 1创建时间正序 2创建时间倒序"
)
@RequestParam
Integer
sortType
,
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
StallPositionManageList
>
pmsStallPositionManages
=
pmsStallPositionManageService
.
list
(
sortType
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
pmsStallPositionManages
));
}
@ApiOperation
(
value
=
"添加档口位置"
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:create')")
public
CommonResult
save
(
@RequestBody
StallPositionManageVo
stallVo
,
BindingResult
result
)
{
CommonResult
commonResult
;
int
count
=
pmsStallPositionManageService
.
save
(
stallVo
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"根据编号查询档口位置信息"
)
@RequestMapping
(
value
=
"/stallInfo"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
<
StallPositionManageVo
>
stallInfo
(
@ApiParam
(
"广告id"
)
@RequestParam
Long
id
)
{
return
CommonResult
.
success
(
pmsStallPositionManageService
.
stallInfo
(
id
));
}
@ApiOperation
(
value
=
"更新档口位置信息"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
<
PmsStallPositionManage
>
update
(
@RequestBody
StallPositionManageVo
stallVo
)
{
CommonResult
commonResult
;
int
count
=
pmsStallPositionManageService
.
update
(
stallVo
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"删除档口"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:brand:read')")
public
CommonResult
delete
(
@ApiParam
(
"广告id"
)
@RequestParam
Long
id
)
{
CommonResult
commonResult
;
int
count
=
pmsStallPositionManageService
.
delete
(
id
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
"档口筛选列表"
)
@RequestMapping
(
value
=
"/getProvinceStallList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
PmsStallPositionManage
>>
getProvinceStallList
(
@ApiParam
(
"省id"
)
@RequestParam
(
required
=
false
)
Long
provinceId
)
{
List
<
PmsStallPositionManage
>
stalls
=
pmsStallPositionManageService
.
getProvinceStallList
(
provinceId
);
return
CommonResult
.
success
(
stalls
);
}
@ApiOperation
(
"档口区域筛选列表"
)
@RequestMapping
(
value
=
"/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-admin/src/main/java/com/macro/mall/controller/PmsStoreyManageController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.Vo.StoreyParamVo
;
import
com.macro.mall.model.PmsStoreyManage
;
import
com.macro.mall.model.PmsStoreyType
;
import
com.macro.mall.service.storey.PmsStoreyManageService
;
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/3/2
*/
@Controller
@Api
(
tags
=
"楼层管理"
,
description
=
"楼层管理"
)
@RequestMapping
(
"/storey"
)
public
class
PmsStoreyManageController
{
@Resource
private
PmsStoreyManageService
pmsStoreyManageService
;
@ApiOperation
(
value
=
"楼层管理添加"
)
@RequestMapping
(
value
=
"/listAll"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsStoreyManage
>>
listAll
(
@RequestParam
(
name
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@RequestParam
(
name
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
)
{
CommonResult
commonResult
=
pmsStoreyManageService
.
listAll
(
pageNum
,
pageSize
);
return
commonResult
;
}
@ApiOperation
(
value
=
"楼层管理添加"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
StoreyParamVo
storeyParamVo
)
{
CommonResult
commonResult
=
pmsStoreyManageService
.
create
(
storeyParamVo
);
return
commonResult
;
}
@ApiOperation
(
value
=
"获取楼层管理信息"
)
@RequestMapping
(
value
=
"/info"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
StoreyParamVo
>
info
(
@ApiParam
(
"楼层id"
)
@RequestParam
Long
id
)
{
CommonResult
commonResult
=
pmsStoreyManageService
.
info
(
id
);
return
commonResult
;
}
@ApiOperation
(
value
=
"更新楼层管理"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@RequestBody
StoreyParamVo
storeyParamVo
)
{
CommonResult
commonResult
=
pmsStoreyManageService
.
update
(
storeyParamVo
);
return
commonResult
;
}
@ApiOperation
(
value
=
"删除楼层"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@ApiParam
(
"楼层id"
)
@RequestParam
Long
id
)
{
CommonResult
commonResult
=
pmsStoreyManageService
.
delete
(
id
);
return
commonResult
;
}
@ApiOperation
(
value
=
"获取楼层内容内容"
)
@RequestMapping
(
value
=
"/getStoreyTyps"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
PmsStoreyType
>>
getStoreyTyps
()
{
List
<
PmsStoreyType
>
pmsStoreyTypes
=
pmsStoreyManageService
.
getStoreyTyps
();
return
CommonResult
.
success
(
pmsStoreyTypes
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/SmsCouponController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.marketing.SendGroupCouponParam
;
import
com.macro.mall.domain.dto.marketing.SmsCouponListParam
;
import
com.macro.mall.domain.vo.coupon.SmsCouponVo
;
import
com.macro.mall.model.SmsCoupon
;
import
com.macro.mall.service.coupon.SmsCouponService
;
import
com.macro.mall.task.SmsCouponSendTask
;
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
(
"/coupon"
)
public
class
SmsCouponController
{
@Resource
private
SmsCouponService
couponService
;
@Resource
private
SmsCouponSendTask
couponSendTask
;
@ApiOperation
(
"添加优惠券"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
add
(
@RequestBody
SmsCoupon
coupon
)
{
int
count
=
couponService
.
create
(
coupon
);
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
=
couponService
.
delete
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"修改优惠券"
)
@PutMapping
@ResponseBody
public
CommonResult
update
(
@RequestBody
SmsCoupon
coupon
)
{
int
count
=
couponService
.
update
(
coupon
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"优惠券列表-平台端"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsCouponVo
>>
list
(
@ModelAttribute
SmsCouponListParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsCouponVo
>
couponList
=
couponService
.
list
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
couponList
));
}
@ApiOperation
(
"优惠券列表-供应商端"
)
@RequestMapping
(
value
=
"mcht/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsCouponVo
>>
mchtList
(
@ModelAttribute
SmsCouponListParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsCouponVo
>
couponList
=
couponService
.
mchtList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
couponList
));
}
@ApiOperation
(
"获取单个优惠券的详细信息"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
SmsCouponVo
>
getItem
(
@PathVariable
Long
id
)
{
SmsCouponVo
coupon
=
couponService
.
getItem
(
id
);
return
CommonResult
.
success
(
coupon
);
}
@ApiOperation
(
"群发优惠券"
)
@PostMapping
(
value
=
"group"
)
@ResponseBody
public
CommonResult
sendGroupCoupon
(
@RequestBody
SendGroupCouponParam
param
)
{
couponSendTask
.
sendGroupCoupon
(
param
);
return
CommonResult
.
success
(
"群发成功"
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/SmsCouponHistoryController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.SmsCouponHistory
;
import
com.macro.mall.service.SmsCouponHistoryService
;
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.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 优惠券领取记录管理Controller
* Created by macro on 2018/11/6.
*/
@Controller
@Api
(
tags
=
"优惠券领取记录管理"
,
description
=
"优惠券领取记录管理"
)
@RequestMapping
(
"/couponHistory"
)
public
class
SmsCouponHistoryController
{
@Resource
private
SmsCouponHistoryService
historyService
;
@ApiOperation
(
"根据优惠券id,使用状态,订单编号分页获取领取记录"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsCouponHistory
>>
list
(
@RequestParam
(
value
=
"couponId"
,
required
=
false
)
Long
couponId
,
@RequestParam
(
value
=
"useStatus"
,
required
=
false
)
Integer
useStatus
,
@RequestParam
(
value
=
"orderSn"
,
required
=
false
)
String
orderSn
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsCouponHistory
>
historyList
=
historyService
.
list
(
couponId
,
useStatus
,
orderSn
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
historyList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.SmsFlashPromotion
;
import
com.macro.mall.service.SmsFlashPromotionService
;
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/11/16.
*/
@Controller
@Api
(
tags
=
"限时购活动管理-废弃"
,
description
=
"限时购活动管理"
)
@RequestMapping
(
"/flash"
)
public
class
SmsFlashPromotionController
{
@Resource
private
SmsFlashPromotionService
flashPromotionService
;
@ApiOperation
(
"添加活动"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
SmsFlashPromotion
flashPromotion
)
{
int
count
=
flashPromotionService
.
create
(
flashPromotion
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"编辑活动信息"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
update
(
@PathVariable
Long
id
,
@RequestBody
SmsFlashPromotion
flashPromotion
)
{
int
count
=
flashPromotionService
.
update
(
id
,
flashPromotion
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"删除活动信息"
)
@RequestMapping
(
value
=
"/delete/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
delete
(
@PathVariable
Long
id
)
{
int
count
=
flashPromotionService
.
delete
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"修改上下线状态"
)
@RequestMapping
(
value
=
"/update/status/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Object
update
(
@PathVariable
Long
id
,
Integer
status
)
{
int
count
=
flashPromotionService
.
updateStatus
(
id
,
status
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"获取活动详情"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
Object
getItem
(
@PathVariable
Long
id
)
{
SmsFlashPromotion
flashPromotion
=
flashPromotionService
.
getItem
(
id
);
return
CommonResult
.
success
(
flashPromotion
);
}
@ApiOperation
(
"根据活动名称分页查询"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
Object
getItem
(
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsFlashPromotion
>
flashPromotionList
=
flashPromotionService
.
list
(
keyword
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
flashPromotionList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionProductRelationController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.SmsFlashPromotionProduct
;
import
com.macro.mall.model.SmsFlashPromotionProductRelation
;
import
com.macro.mall.service.SmsFlashPromotionProductRelationService
;
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/11/16.
*/
@Controller
@Api
(
tags
=
"限时购和商品关系管理"
,
description
=
"限时购和商品关系管理"
)
@RequestMapping
(
"/flashProductRelation"
)
public
class
SmsFlashPromotionProductRelationController
{
@Resource
private
SmsFlashPromotionProductRelationService
relationService
;
@ApiOperation
(
"批量选择商品添加关联"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
List
<
SmsFlashPromotionProductRelation
>
relationList
)
{
int
count
=
relationService
.
create
(
relationList
);
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
SmsFlashPromotionProductRelation
relation
)
{
int
count
=
relationService
.
update
(
id
,
relation
);
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
=
relationService
.
delete
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"获取管理商品促销信息"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
SmsFlashPromotionProductRelation
>
getItem
(
@PathVariable
Long
id
)
{
SmsFlashPromotionProductRelation
relation
=
relationService
.
getItem
(
id
);
return
CommonResult
.
success
(
relation
);
}
@ApiOperation
(
"分页查询不同场次关联及商品信息"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsFlashPromotionProduct
>>
list
(
@RequestParam
(
value
=
"flashPromotionId"
)
Long
flashPromotionId
,
@RequestParam
(
value
=
"flashPromotionSessionId"
)
Long
flashPromotionSessionId
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsFlashPromotionProduct
>
flashPromotionProductList
=
relationService
.
list
(
flashPromotionId
,
flashPromotionSessionId
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
flashPromotionProductList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/SmsFlashPromotionSessionController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.SmsFlashPromotionSessionDetail
;
import
com.macro.mall.model.SmsFlashPromotionSession
;
import
com.macro.mall.service.SmsFlashPromotionSessionService
;
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/11/16.
*/
@Controller
@Api
(
tags
=
"限时购场次管理"
,
description
=
"限时购场次管理"
)
@RequestMapping
(
"/flashSession"
)
public
class
SmsFlashPromotionSessionController
{
@Resource
private
SmsFlashPromotionSessionService
flashPromotionSessionService
;
@ApiOperation
(
"添加场次"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
SmsFlashPromotionSession
promotionSession
)
{
int
count
=
flashPromotionSessionService
.
create
(
promotionSession
);
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
SmsFlashPromotionSession
promotionSession
)
{
int
count
=
flashPromotionSessionService
.
update
(
id
,
promotionSession
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"修改启用状态"
)
@RequestMapping
(
value
=
"/update/status/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateStatus
(
@PathVariable
Long
id
,
Integer
status
)
{
int
count
=
flashPromotionSessionService
.
updateStatus
(
id
,
status
);
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
=
flashPromotionSessionService
.
delete
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"获取场次详情"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
SmsFlashPromotionSession
>
getItem
(
@PathVariable
Long
id
)
{
SmsFlashPromotionSession
promotionSession
=
flashPromotionSessionService
.
getItem
(
id
);
return
CommonResult
.
success
(
promotionSession
);
}
@ApiOperation
(
"获取全部场次"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
SmsFlashPromotionSession
>>
list
()
{
List
<
SmsFlashPromotionSession
>
promotionSessionList
=
flashPromotionSessionService
.
list
();
return
CommonResult
.
success
(
promotionSessionList
);
}
@ApiOperation
(
"获取全部可选场次及其数量"
)
@RequestMapping
(
value
=
"/selectList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
SmsFlashPromotionSessionDetail
>>
selectList
(
Long
flashPromotionId
)
{
List
<
SmsFlashPromotionSessionDetail
>
promotionSessionList
=
flashPromotionSessionService
.
selectList
(
flashPromotionId
);
return
CommonResult
.
success
(
promotionSessionList
);
}
}
\ No newline at end of file
mall-admin/src/main/java/com/macro/mall/controller/SmsHomeAdvertiseController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.SmsHomeAdvertise
;
import
com.macro.mall.service.SmsHomeAdvertiseService
;
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/11/7.
*/
@Controller
@Api
(
tags
=
"首页轮播广告管理"
,
description
=
"首页轮播广告管理"
)
@RequestMapping
(
"/home/advertise"
)
public
class
SmsHomeAdvertiseController
{
@Resource
private
SmsHomeAdvertiseService
advertiseService
;
@ApiOperation
(
"添加广告"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
SmsHomeAdvertise
advertise
)
{
int
count
=
advertiseService
.
create
(
advertise
);
if
(
count
>
0
)
return
CommonResult
.
success
(
count
);
return
CommonResult
.
failed
();
}
@ApiOperation
(
"删除广告"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
int
count
=
advertiseService
.
delete
(
ids
);
if
(
count
>
0
)
return
CommonResult
.
success
(
count
);
return
CommonResult
.
failed
();
}
@ApiOperation
(
"修改上下线状态"
)
@RequestMapping
(
value
=
"/update/status/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateStatus
(
@PathVariable
Long
id
,
Integer
status
)
{
int
count
=
advertiseService
.
updateStatus
(
id
,
status
);
if
(
count
>
0
)
return
CommonResult
.
success
(
count
);
return
CommonResult
.
failed
();
}
@ApiOperation
(
"获取广告详情"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
SmsHomeAdvertise
>
getItem
(
@PathVariable
Long
id
)
{
SmsHomeAdvertise
advertise
=
advertiseService
.
getItem
(
id
);
return
CommonResult
.
success
(
advertise
);
}
@ApiOperation
(
"修改广告"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@PathVariable
Long
id
,
@RequestBody
SmsHomeAdvertise
advertise
)
{
int
count
=
advertiseService
.
update
(
id
,
advertise
);
if
(
count
>
0
)
return
CommonResult
.
success
(
count
);
return
CommonResult
.
failed
();
}
@ApiOperation
(
"分页查询广告"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsHomeAdvertise
>>
list
(
@RequestParam
(
value
=
"name"
,
required
=
false
)
String
name
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
Integer
type
,
@RequestParam
(
value
=
"endTime"
,
required
=
false
)
String
endTime
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsHomeAdvertise
>
advertiseList
=
advertiseService
.
list
(
name
,
type
,
endTime
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
advertiseList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/SmsHomeBrandController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.SmsHomeBrand
;
import
com.macro.mall.service.SmsHomeBrandService
;
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/11/6.
*/
@Controller
@Api
(
tags
=
"首页品牌管理"
,
description
=
"首页品牌管理"
)
@RequestMapping
(
"/home/brand"
)
public
class
SmsHomeBrandController
{
@Resource
private
SmsHomeBrandService
homeBrandService
;
@ApiOperation
(
"添加首页推荐品牌"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
List
<
SmsHomeBrand
>
homeBrandList
)
{
int
count
=
homeBrandService
.
create
(
homeBrandList
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"修改品牌排序"
)
@RequestMapping
(
value
=
"/update/sort/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateSort
(
@PathVariable
Long
id
,
Integer
sort
)
{
int
count
=
homeBrandService
.
updateSort
(
id
,
sort
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量删除推荐品牌"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
int
count
=
homeBrandService
.
delete
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量修改推荐状态"
)
@RequestMapping
(
value
=
"/update/recommendStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateRecommendStatus
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
,
@RequestParam
Integer
recommendStatus
)
{
int
count
=
homeBrandService
.
updateRecommendStatus
(
ids
,
recommendStatus
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"分页查询推荐品牌"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsHomeBrand
>>
list
(
@RequestParam
(
value
=
"brandName"
,
required
=
false
)
String
brandName
,
@RequestParam
(
value
=
"recommendStatus"
,
required
=
false
)
Integer
recommendStatus
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsHomeBrand
>
homeBrandList
=
homeBrandService
.
list
(
brandName
,
recommendStatus
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
homeBrandList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/SmsHomeNewProductController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.SmsHomeNewProduct
;
import
com.macro.mall.service.SmsHomeNewProductService
;
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/11/6.
*/
@Controller
@Api
(
tags
=
"首页新品管理"
,
description
=
"首页新品管理"
)
@RequestMapping
(
"/home/newProduct"
)
public
class
SmsHomeNewProductController
{
@Resource
private
SmsHomeNewProductService
homeNewProductService
;
@ApiOperation
(
"添加首页推荐品牌"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
List
<
SmsHomeNewProduct
>
homeBrandList
)
{
int
count
=
homeNewProductService
.
create
(
homeBrandList
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"修改推荐排序"
)
@RequestMapping
(
value
=
"/update/sort/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateSort
(
@PathVariable
Long
id
,
Integer
sort
)
{
int
count
=
homeNewProductService
.
updateSort
(
id
,
sort
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量删除推荐"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
int
count
=
homeNewProductService
.
delete
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量修改推荐状态"
)
@RequestMapping
(
value
=
"/update/recommendStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateRecommendStatus
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
,
@RequestParam
Integer
recommendStatus
)
{
int
count
=
homeNewProductService
.
updateRecommendStatus
(
ids
,
recommendStatus
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"分页查询推荐"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsHomeNewProduct
>>
list
(
@RequestParam
(
value
=
"productName"
,
required
=
false
)
String
productName
,
@RequestParam
(
value
=
"recommendStatus"
,
required
=
false
)
Integer
recommendStatus
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsHomeNewProduct
>
homeBrandList
=
homeNewProductService
.
list
(
productName
,
recommendStatus
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
homeBrandList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendProductController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.SmsHomeRecommendProduct
;
import
com.macro.mall.service.SmsHomeRecommendProductService
;
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/11/6.
*/
@Controller
@Api
(
tags
=
"首页人气推荐管理"
,
description
=
"首页人气推荐管理"
)
@RequestMapping
(
"/home/recommendProduct"
)
public
class
SmsHomeRecommendProductController
{
@Resource
private
SmsHomeRecommendProductService
recommendProductService
;
@ApiOperation
(
"添加首页推荐"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
List
<
SmsHomeRecommendProduct
>
homeBrandList
)
{
int
count
=
recommendProductService
.
create
(
homeBrandList
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"修改推荐排序"
)
@RequestMapping
(
value
=
"/update/sort/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateSort
(
@PathVariable
Long
id
,
Integer
sort
)
{
int
count
=
recommendProductService
.
updateSort
(
id
,
sort
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量删除推荐"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
int
count
=
recommendProductService
.
delete
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量修改推荐状态"
)
@RequestMapping
(
value
=
"/update/recommendStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateRecommendStatus
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
,
@RequestParam
Integer
recommendStatus
)
{
int
count
=
recommendProductService
.
updateRecommendStatus
(
ids
,
recommendStatus
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"分页查询推荐"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsHomeRecommendProduct
>>
list
(
@RequestParam
(
value
=
"productName"
,
required
=
false
)
String
productName
,
@RequestParam
(
value
=
"recommendStatus"
,
required
=
false
)
Integer
recommendStatus
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsHomeRecommendProduct
>
homeBrandList
=
recommendProductService
.
list
(
productName
,
recommendStatus
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
homeBrandList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/SmsHomeRecommendSubjectController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.SmsHomeRecommendSubject
;
import
com.macro.mall.service.SmsHomeRecommendSubjectService
;
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/11/6.
*/
@Controller
@Api
(
tags
=
"首页专题推荐管理"
,
description
=
"首页专题推荐管理"
)
@RequestMapping
(
"/home/recommendSubject"
)
public
class
SmsHomeRecommendSubjectController
{
@Resource
private
SmsHomeRecommendSubjectService
recommendSubjectService
;
@ApiOperation
(
"添加首页推荐专题"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
List
<
SmsHomeRecommendSubject
>
homeBrandList
)
{
int
count
=
recommendSubjectService
.
create
(
homeBrandList
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"修改推荐排序"
)
@RequestMapping
(
value
=
"/update/sort/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateSort
(
@PathVariable
Long
id
,
Integer
sort
)
{
int
count
=
recommendSubjectService
.
updateSort
(
id
,
sort
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量删除推荐"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
int
count
=
recommendSubjectService
.
delete
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量修改推荐状态"
)
@RequestMapping
(
value
=
"/update/recommendStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateRecommendStatus
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
,
@RequestParam
Integer
recommendStatus
)
{
int
count
=
recommendSubjectService
.
updateRecommendStatus
(
ids
,
recommendStatus
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"分页查询推荐"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsHomeRecommendSubject
>>
list
(
@RequestParam
(
value
=
"subjectName"
,
required
=
false
)
String
subjectName
,
@RequestParam
(
value
=
"recommendStatus"
,
required
=
false
)
Integer
recommendStatus
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsHomeRecommendSubject
>
homeBrandList
=
recommendSubjectService
.
list
(
subjectName
,
recommendStatus
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
homeBrandList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/UmsActivityTrainingController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.UmsActivityTrainingParam
;
import
com.macro.mall.dto.UmsEventRegistrationParam
;
import
com.macro.mall.model.UmsActivityTraining
;
import
com.macro.mall.model.UmsEventRegistration
;
import
com.macro.mall.service.UmsActivityTrainingService
;
import
com.macro.mall.service.UmsEventRegistrationService
;
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 UmsActivityTrainingController
* @Description
* @Date 2020/3/28 10:44
*/
@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
(
UmsActivityTrainingParam
activityTrainingParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
UmsActivityTraining
>
list
=
umsActivityTrainingService
.
queryPageList
(
pageSize
,
pageNum
,
activityTrainingParam
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
/**
* 添加活动培训
*/
@ApiOperation
(
value
=
"添加活动培训"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
add
(
@RequestBody
UmsActivityTraining
umsActivityTraining
){
return
umsActivityTrainingService
.
add
(
umsActivityTraining
);
}
/**
* 查看活动培训详情
*/
@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
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@RequestBody
UmsActivityTraining
umsActivityTraining
){
return
umsActivityTrainingService
.
update
(
umsActivityTraining
);
}
/**
* 删除活动
*/
@ApiOperation
(
value
=
"删除活动"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
delete
(
@RequestParam
Long
id
){
return
umsActivityTrainingService
.
delete
(
id
);
}
/**
* 查看活动报名情况
*/
@ApiOperation
(
value
=
"查看活动报名情况"
)
@RequestMapping
(
value
=
"/viewHappening"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"acivityId"
,
value
=
"活动id"
,
dataType
=
"Long"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"pageSize"
,
value
=
"展示条数"
,
dataType
=
"Integer"
,
required
=
true
,
paramType
=
"query"
,
defaultValue
=
"5"
),
@ApiImplicitParam
(
name
=
"pageNum"
,
value
=
"当前页"
,
dataType
=
"Integer"
,
required
=
true
,
paramType
=
"query"
,
defaultValue
=
"1"
),
})
public
CommonResult
<
CommonPage
<
UmsEventRegistration
>>
viewHappening
(
Long
acivityId
,
Integer
pageSize
,
Integer
pageNum
){
List
<
UmsEventRegistration
>
list
=
umsEventRegistrationService
.
queryPageList
(
pageSize
,
pageNum
,
acivityId
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
/**
* 确认报名情况
*/
@ApiOperation
(
value
=
"确认报名情况"
)
@RequestMapping
(
value
=
"/confirmStatus"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
confirmStatus
(
@RequestBody
UmsEventRegistrationParam
umsEventRegistrationParam
){
return
umsEventRegistrationService
.
confirmStatus
(
umsEventRegistrationParam
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/activity/SmsActivityController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
activity
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.vo.activity.SmsActivityDetailDto
;
import
com.macro.mall.domain.vo.activity.SmsActivityMchtVo
;
import
com.macro.mall.domain.vo.activity.SmsActivityVo
;
import
com.macro.mall.model.SmsActivity
;
import
com.macro.mall.model.SmsActivityMcht
;
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
@RequestMapping
(
value
=
"activities"
)
public
class
SmsActivityController
{
@Resource
private
SmsActivityService
activityService
;
@GetMapping
@ApiOperation
(
"活动列表"
)
public
CommonResult
<
List
<
SmsActivity
>>
getList
()
{
List
list
=
activityService
.
queryList
();
return
CommonResult
.
success
(
list
);
}
@GetMapping
(
value
=
"{id}"
)
@ApiOperation
(
"活动详情-供应商端"
)
public
CommonResult
<
SmsActivityDetailDto
>
getDetail
(
@PathVariable
Long
id
)
{
SmsActivityDetailDto
detail
=
activityService
.
getDetail
(
id
);
return
CommonResult
.
success
(
detail
);
}
@GetMapping
(
value
=
"all"
)
@ApiOperation
(
"所有活动列表"
)
public
CommonResult
<
CommonPage
<
SmsActivityVo
>>
getAllList
(
@ModelAttribute
SmsActivity
activity
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
list
=
activityService
.
queryAllList
(
activity
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@GetMapping
(
value
=
"mcht"
)
@ApiOperation
(
"活动商家列表"
)
public
CommonResult
<
CommonPage
<
SmsActivityMchtVo
>>
getMchtList
(
@ModelAttribute
SmsActivityMcht
activityMcht
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsActivityMchtVo
>
list
=
activityService
.
getMchtList
(
activityMcht
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@PostMapping
@ApiOperation
(
"创建活动"
)
public
CommonResult
create
(
@RequestBody
SmsActivity
activity
)
{
activityService
.
create
(
activity
);
return
CommonResult
.
success
(
"创建成功"
);
}
@PutMapping
@ApiOperation
(
"修改活动"
)
public
CommonResult
update
(
@RequestBody
SmsActivity
activity
)
{
activityService
.
update
(
activity
);
return
CommonResult
.
success
(
"修改成功"
);
}
@DeleteMapping
(
value
=
"{id}"
)
@ApiOperation
(
"删除活动"
)
public
CommonResult
delete
(
@PathVariable
Long
id
)
{
activityService
.
delete
(
id
);
return
CommonResult
.
success
(
"删除成功"
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/activity/SmsActivityMchtProductController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
activity
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.ActivityMchtProductListParam
;
import
com.macro.mall.domain.dto.ActivityMchtProductSignUpDto
;
import
com.macro.mall.domain.dto.product.ActivityAuditProductParam
;
import
com.macro.mall.domain.vo.activity.SmsActivityMchtProductVo
;
import
com.macro.mall.service.activity.SmsActivityMchtProductService
;
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
@RequestMapping
(
value
=
"activities/mcht/product"
)
public
class
SmsActivityMchtProductController
{
@Resource
private
SmsActivityMchtProductService
activityMchtProductService
;
@GetMapping
@ApiOperation
(
"活动商品列表"
)
public
CommonResult
<
CommonPage
<
SmsActivityMchtProductVo
>>
getList
(
@ModelAttribute
ActivityMchtProductListParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsActivityMchtProductVo
>
list
=
activityMchtProductService
.
queryList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@PostMapping
@ApiOperation
(
"活动报名/商品添加"
)
public
CommonResult
signUp
(
@RequestBody
ActivityMchtProductSignUpDto
dto
){
activityMchtProductService
.
signUp
(
dto
);
return
CommonResult
.
success
(
"添加成功"
);
}
@PostMapping
(
value
=
"exit"
)
@ApiOperation
(
"活动退出"
)
public
CommonResult
exit
(
@RequestBody
ActivityMchtProductSignUpDto
dto
){
activityMchtProductService
.
exit
(
dto
);
return
CommonResult
.
success
(
"活动退出成功"
);
}
@PutMapping
@ApiOperation
(
"商品审核/商品下架"
)
public
CommonResult
auditProduct
(
@RequestBody
ActivityAuditProductParam
param
){
activityMchtProductService
.
auditProduct
(
param
);
return
CommonResult
.
success
(
"商品审核成功"
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/aftersales/OmsAfterSalesController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
aftersales
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.component.DgbSecurityUserHelper
;
import
com.macro.mall.domain.dto.order.OmsOrderReturnParam
;
import
com.macro.mall.domain.vo.order.OmsOrderReturnApplyResult
;
import
com.macro.mall.dto.*
;
import
com.macro.mall.mapper.UmsAdminMapper
;
import
com.macro.mall.model.OmsOrderReturnApply
;
import
com.macro.mall.model.OmsOrderSon
;
import
com.macro.mall.model.UmsAdmin
;
import
com.macro.mall.service.aftersales.OmsAfterSalesService
;
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
(
"/afterSales"
)
public
class
OmsAfterSalesController
{
@Resource
private
OmsAfterSalesService
omsAfterSalesService
;
@Resource
private
UmsAdminMapper
umsAdminMapper
;
@ApiOperation
(
"获取服务单记录"
)
@RequestMapping
(
value
=
"/record"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
OmsOrderReturnApplyResult
>>
getOrderReturnRecord
(
@ModelAttribute
OmsOrderReturnParam
omsOrderReturnParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
if
(
omsOrderReturnParam
.
getType
()
==
2
){
UmsAdmin
umsAdmin
=
DgbSecurityUserHelper
.
getCurrentUser
();
if
(
umsAdmin
.
getParentId
()
!=
null
){
umsAdmin
=
umsAdminMapper
.
selectByPrimaryKey
(
umsAdmin
.
getParentId
());
}
omsOrderReturnParam
.
setMchtId
(
umsAdmin
.
getId
());
}
List
<
OmsOrderReturnApplyResult
>
orderReturnApplies
=
omsAfterSalesService
.
getOrderReturnRecord
(
omsOrderReturnParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderReturnApplies
));
}
@ApiOperation
(
"获取服务单详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"orderId"
,
value
=
"服务单id"
,
required
=
true
,
dataType
=
"long"
,
paramType
=
"query"
)
})
public
CommonResult
<
OmsOrderReturnResult
>
getDetail
(
Long
orderId
){
OmsOrderReturnResult
omsOrderReturnResult
=
omsAfterSalesService
.
getDetail
(
orderId
);
return
CommonResult
.
success
(
omsOrderReturnResult
);
}
@ApiOperation
(
"服务单商家操作"
)
@RequestMapping
(
value
=
"/operation"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
doOperation
(
@RequestBody
OmsOrderReturnOperationParam
omsOrderReturnOperationParam
)
throws
Exception
{
UmsAdmin
umsAdmin
=
DgbSecurityUserHelper
.
getCurrentUser
();
omsOrderReturnOperationParam
.
setUmsAdmin
(
umsAdmin
);
Integer
count
=
omsAfterSalesService
.
doOperation
(
omsOrderReturnOperationParam
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"获取退货单记录"
)
@RequestMapping
(
value
=
"/cancelRecord"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
OmsOrderSon
>>
getOrderCancelRecord
(
@ModelAttribute
OmsOrderCancelRecordParam
omsOrderCancelRecordParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
UmsAdmin
umsAdmin
=
DgbSecurityUserHelper
.
getCurrentUser
();
if
(
umsAdmin
.
getParentId
()
!=
null
){
umsAdmin
=
umsAdminMapper
.
selectByPrimaryKey
(
umsAdmin
.
getParentId
());
}
List
<
OmsOrderSon
>
omsOrderSons
=
omsAfterSalesService
.
getOrderCancelRecord
(
omsOrderCancelRecordParam
,
umsAdmin
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
omsOrderSons
));
}
@ApiOperation
(
"根据退货单id获取退货单详情"
)
@RequestMapping
(
value
=
"/returnDetail"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"orderId"
,
value
=
"服务单id"
,
required
=
true
,
dataType
=
"long"
,
paramType
=
"query"
)
})
public
CommonResult
<
OmsOrderReturnResult
>
getReturnOrderDetail
(
Long
orderId
){
OmsOrderReturnResult
omsOrderReturnResult
=
omsAfterSalesService
.
getReturnOrderDetail
(
orderId
);
return
CommonResult
.
success
(
omsOrderReturnResult
);
}
@ApiOperation
(
"根据子订单id获取退货单详情"
)
@RequestMapping
(
value
=
"/cancelDetail"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"orderId"
,
value
=
"子订单id"
,
required
=
true
,
dataType
=
"long"
,
paramType
=
"query"
)
})
public
CommonResult
<
OmsOrderReturnResult
>
getCancelDetail
(
@ModelAttribute
Long
orderId
){
OmsOrderReturnResult
omsOrderReturnResult
=
omsAfterSalesService
.
getCancelDetail
(
orderId
);
return
CommonResult
.
success
(
omsOrderReturnResult
);
}
@ApiOperation
(
"订单退款"
)
@RequestMapping
(
value
=
"/refund"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
orderRefund
(
@ModelAttribute
OmsOrderRefundParam
omsOrderRefundParam
)
throws
Exception
{
Integer
count
=
omsAfterSalesService
.
orderRefund
(
omsOrderRefundParam
);
return
CommonResult
.
success
(
count
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/article/CmsArticleClassityController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
article
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.CmsArticleClassifyNote
;
import
com.macro.mall.model.CmsArticleClassify
;
import
com.macro.mall.service.article.CmsArticleClassifyService
;
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
;
@Api
(
tags
=
"文章分类"
,
description
=
"文章分类"
)
@RestController
@RequestMapping
(
value
=
"/classity"
)
public
class
CmsArticleClassityController
{
@Resource
private
CmsArticleClassifyService
cmsArticleClassifyService
;
@ApiOperation
(
"获取分类列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
CmsArticleClassifyNote
>>
getClassityList
(){
List
<
CmsArticleClassifyNote
>
notes
=
cmsArticleClassifyService
.
getClassityList
();
return
CommonResult
.
success
(
notes
);
}
@ApiOperation
(
"获取一级分类列表"
)
@RequestMapping
(
value
=
"/firstList"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
CmsArticleClassify
>>
getFirstList
(){
List
<
CmsArticleClassify
>
articleClassifies
=
cmsArticleClassifyService
.
getFirstList
();
return
CommonResult
.
success
(
articleClassifies
);
}
@ApiOperation
(
"添加文章分类"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
addArticleClassify
(
@RequestBody
CmsArticleClassify
cmsArticleClassify
){
Integer
count
=
cmsArticleClassifyService
.
addArticleClassify
(
cmsArticleClassify
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"编辑文章分类"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateArticleClassify
(
@RequestBody
CmsArticleClassify
cmsArticleClassify
){
Integer
count
=
cmsArticleClassifyService
.
updateArticleClassify
(
cmsArticleClassify
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"删除分类"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
delArticleClassify
(
@ApiParam
(
"分类id"
)
@RequestParam
Long
id
){
Integer
count
=
cmsArticleClassifyService
.
delArticleClassify
(
id
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"根据id查询文章分类"
)
@RequestMapping
(
value
=
"selectById"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CmsArticleClassify
>
selById
(
@ApiParam
(
"分类id"
)
@RequestParam
Long
id
){
CmsArticleClassify
cmsArticleClassify
=
cmsArticleClassifyService
.
selById
(
id
);
return
CommonResult
.
success
(
cmsArticleClassify
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/article/CmsArticleController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
article
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.CmsArticleResult
;
import
com.macro.mall.model.CmsArticle
;
import
com.macro.mall.service.article.CmsArticleService
;
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
;
@Api
(
tags
=
"文章"
,
description
=
"文章"
)
@RestController
@RequestMapping
(
value
=
"/article"
)
public
class
CmsArticleController
{
@Resource
private
CmsArticleService
cmsArticleService
;
@ApiOperation
(
value
=
"根据分类获取文章列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
CmsArticle
>>
getArticleLst
(
@ApiParam
(
"一级分类id"
)
Long
paraentClassifyId
,
@ApiParam
(
"二级分类id"
)
Long
classityId
){
List
<
CmsArticle
>
articleList
=
cmsArticleService
.
getArticleList
(
paraentClassifyId
,
classityId
);
return
CommonResult
.
success
(
articleList
);
}
@ApiOperation
(
value
=
"添加文章"
)
@RequestMapping
(
value
=
"add"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
addAeticle
(
@RequestBody
CmsArticle
cmsArticle
){
Integer
count
=
cmsArticleService
.
addAeticle
(
cmsArticle
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"根据id获取文章详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CmsArticle
>
getArticleById
(
@RequestParam
Long
articleId
){
CmsArticle
cmsArticle
=
cmsArticleService
.
getArticleById
(
articleId
);
return
CommonResult
.
success
(
cmsArticle
);
}
@ApiOperation
(
value
=
"删除文章"
)
@RequestMapping
(
value
=
"/del"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
delArticleById
(
@RequestParam
Long
articleId
){
Integer
count
=
cmsArticleService
.
delArticleById
(
articleId
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"编辑文章"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateArticle
(
@RequestBody
CmsArticle
cmsArticle
){
Integer
count
=
cmsArticleService
.
updateArticle
(
cmsArticle
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"文章列表筛选"
)
@RequestMapping
(
value
=
"/selList"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
CmsArticleResult
>>
getCmsArticleList
(
@ApiParam
(
"paraentClassifyId"
)
Long
paraentClassifyId
,
@ApiParam
(
"classifyId"
)
Long
classifyId
,
@ApiParam
(
"keywords"
)
String
keywords
,
@ApiParam
(
"pageSize"
)
Integer
pageSize
,
@ApiParam
(
"pageNum"
)
@RequestParam
Integer
pageNum
){
List
<
CmsArticleResult
>
results
=
cmsArticleService
.
getCmsArticleList
(
paraentClassifyId
,
classifyId
,
keywords
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
@ApiOperation
(
value
=
"设置文章是否显示"
)
@RequestMapping
(
value
=
"/setShow"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
setShowFlag
(
@ApiParam
(
"文章id"
)
@RequestParam
Long
articleId
){
Integer
count
=
cmsArticleService
.
setShowFlag
(
articleId
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/customcolumn/CmsCustomColumnController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
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.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @ClassName CmsCustomColumnController
* @Description TODO
* @Author cxh
* @Date 2020/4/10 13:42
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"自定义栏目管理"
,
description
=
"自定义栏目管理"
)
@RequestMapping
(
value
=
"/custom/column"
)
public
class
CmsCustomColumnController
{
@Resource
private
CmsCustomColumnService
cmsCustomColumnService
;
@ApiOperation
(
value
=
"增加自定义栏目"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
addColumn
(
@RequestBody
CmsCustomColumn
customColumn
){
Integer
count
=
cmsCustomColumnService
.
addColumn
(
customColumn
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取栏目列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
CmsCustomColumn
>>
getColumnList
(
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
CmsCustomColumn
>
list
=
cmsCustomColumnService
.
getColumnList
(
null
,
null
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@ApiOperation
(
value
=
"编辑栏目"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateColumn
(
@RequestBody
CmsCustomColumn
customColumn
){
Integer
count
=
cmsCustomColumnService
.
updateColumn
(
customColumn
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/distribution/UmsDistributionRulesController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
distribution
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.UmsDistributionRulesSet
;
import
com.macro.mall.service.distributionmcht.UmsDistributionRulesService
;
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
;
/**
* @ClassName UmsDistributionRulesController
* @Description TODO
* @Author cxh
* @Date 2020/4/1 14:18
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"分销规则设置"
,
description
=
"分销规则设置"
)
@RequestMapping
(
value
=
"/distribution"
)
public
class
UmsDistributionRulesController
{
@Resource
private
UmsDistributionRulesService
umsDistributionRulesService
;
@ApiOperation
(
value
=
"获取规则"
)
@RequestMapping
(
value
=
"/get"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
UmsDistributionRulesSet
>
getRules
(){
UmsDistributionRulesSet
rulesSet
=
umsDistributionRulesService
.
getRules
();
return
CommonResult
.
success
(
rulesSet
);
}
@ApiOperation
(
value
=
"更新规则"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateRules
(
@ModelAttribute
UmsDistributionRulesSet
rulesSet
){
Integer
count
=
umsDistributionRulesService
.
updateRules
(
rulesSet
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/distribution/UmsMemberHierarchyController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
distribution
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.member.UmsMemberHierarchyResult
;
import
com.macro.mall.service.member.UmsMemberHierarchyService
;
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 UmsMemberHierarchyController
* @Description TODO
* @Author cxh
* @Date 2020/4/1 17:28
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"会员分销层级"
,
description
=
"会员分销层级"
)
@RequestMapping
(
value
=
"/hierarchy"
)
public
class
UmsMemberHierarchyController
{
@Resource
private
UmsMemberHierarchyService
umsMemberHierarchyService
;
@ApiOperation
(
value
=
"获取会员层级列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
UmsMemberHierarchyResult
>>
getMemberList
(
String
username
,
Integer
distributionLevel
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
UmsMemberHierarchyResult
>
results
=
umsMemberHierarchyService
.
getMemberList
(
username
,
distributionLevel
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
@ApiOperation
(
value
=
"获取会员下级信息"
)
@RequestMapping
(
value
=
"/lowers"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
UmsMemberHierarchyResult
>
getLowers
(
Long
id
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
UmsMemberHierarchyResult
results
=
umsMemberHierarchyService
.
getLowers
(
id
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
results
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/distributionmcht/PmsDmchtController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
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:19
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"分销商管理"
,
description
=
"分销商管理"
)
@RequestMapping
(
value
=
"/dmcht"
)
public
class
PmsDmchtController
{
@Resource
private
PmsDmchtService
pmsDmchtService
;
@ApiOperation
(
value
=
"分销商邀请"
)
@RequestMapping
(
value
=
"/invitation"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
invitation
(
@RequestBody
PmsDmchtApplyHistory
applyHistory
)
throws
Exception
{
Integer
count
=
pmsDmchtService
.
invitation
(
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
();
}
}
@ApiOperation
(
value
=
"撤销"
)
@RequestMapping
(
value
=
"undo"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
undo
(
@RequestParam
Long
applyId
){
Integer
count
=
pmsDmchtService
.
undo
(
applyId
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/distributionmcht/PmsDmchtLevelController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
distributionmcht
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsDmchtLevel
;
import
com.macro.mall.service.distributionmcht.PmsDmchtLevelService
;
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 PmsDmchtLevelController
* @Description TODO
* @Author cxh
* @Date 2020/4/20 14:02
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"分销商等级管理"
,
description
=
"分销商等级管理"
)
@RequestMapping
(
value
=
"/dmcht/level"
)
public
class
PmsDmchtLevelController
{
@Resource
private
PmsDmchtLevelService
pmsDmchtLevelService
;
@ApiOperation
(
value
=
"获取分销商等级列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
PmsDmchtLevel
>>
getLevelList
(){
List
<
PmsDmchtLevel
>
result
=
pmsDmchtLevelService
.
getLevelList
();
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"设置分销商等级折扣"
)
@RequestMapping
(
value
=
"set"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
setDiscount
(
@RequestBody
PmsDmchtLevel
pmsDmchtLevel
){
Integer
count
=
pmsDmchtLevelService
.
setDiscount
(
pmsDmchtLevel
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取分销商等级折扣"
)
@RequestMapping
(
value
=
"get"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsDmchtLevel
>
getDiscount
(
@RequestParam
Long
levelId
){
PmsDmchtLevel
pmsDmchtLevel
=
pmsDmchtLevelService
.
getDiscount
(
levelId
);
return
CommonResult
.
success
(
pmsDmchtLevel
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/express/PmsExpressCompanyController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
express
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.KuaidnConfigParam
;
import
com.macro.mall.model.vo.ExpressCompanyVo
;
import
com.macro.mall.service.express.PmsExpressCompanyService
;
import
io.swagger.annotations.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"配送方式"
,
description
=
"配送方式"
)
@RequestMapping
(
"expresses"
)
public
class
PmsExpressCompanyController
{
@Resource
private
PmsExpressCompanyService
expressCompanyService
;
@GetMapping
@ApiOperation
(
value
=
"配送方式列表"
)
public
CommonResult
<
List
<
ExpressCompanyVo
>>
list
(
@ApiParam
(
"商家id"
)
@RequestParam
Long
mchtId
)
{
List
<
ExpressCompanyVo
>
companyVoList
=
expressCompanyService
.
queryExpressCompanyListByMchtId
(
mchtId
);
return
CommonResult
.
success
(
companyVoList
);
}
@GetMapping
(
value
=
"business"
)
@ApiOperation
(
value
=
"查询商家所有的快递"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"mchtId"
,
value
=
"商家id"
,
required
=
true
,
dataType
=
"long"
,
paramType
=
"query"
)
})
public
CommonResult
<
List
<
ExpressCompanyVo
>>
businessList
(
Long
mchtId
)
{
List
<
ExpressCompanyVo
>
companyVoList
=
expressCompanyService
.
queryBusinessListByMchtId
(
mchtId
);
return
CommonResult
.
success
(
companyVoList
);
}
// 安装 卸载 接口
@PostMapping
@ApiOperation
(
value
=
"安装/卸载配送方式"
)
public
CommonResult
changeStatus
(
@ApiParam
(
"商家id"
)
@RequestParam
Long
mchtId
,
@ApiParam
(
"快递公司id"
)
@RequestParam
Long
expressId
,
@ApiParam
(
"0卸载 1安装"
)
@RequestParam
Integer
status
)
{
CommonResult
commonResult
;
int
count
=
expressCompanyService
.
changeStatus
(
mchtId
,
expressId
,
status
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
// 快递鸟账号设置 接口
@PostMapping
(
value
=
"kuaidn"
)
@ApiOperation
(
value
=
"快递鸟账号设置"
)
public
CommonResult
kuaidnConfig
(
@RequestBody
KuaidnConfigParam
param
)
{
CommonResult
commonResult
;
int
count
=
expressCompanyService
.
kuaidnConfig
(
param
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
}
mall-admin/src/main/java/com/macro/mall/controller/express/PmsFreightTemplateController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
express
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.PmsFeightTemplateParam
;
import
com.macro.mall.model.PmsFeightTemplate
;
import
com.macro.mall.model.vo.PmsFeightTemplateVo
;
import
com.macro.mall.service.express.PmsFeightTemplateService
;
import
io.swagger.annotations.*
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"运费模板"
,
description
=
"运费模板"
)
@RequestMapping
(
"freight"
)
public
class
PmsFreightTemplateController
{
@Resource
private
PmsFeightTemplateService
feightTemplateService
;
@GetMapping
@ApiOperation
(
value
=
"运费模板列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"mchtId"
,
value
=
"商家id"
,
dataType
=
"long"
,
required
=
false
,
paramType
=
"query"
)
})
public
CommonResult
<
List
<
PmsFeightTemplate
>>
list
(
Long
mchtId
)
{
List
<
PmsFeightTemplate
>
list
=
feightTemplateService
.
list
(
mchtId
);
return
CommonResult
.
success
(
list
);
}
@ApiOperation
(
value
=
"删除运费模板"
)
@RequestMapping
(
value
=
"/delete/{id}"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
delete
(
@PathVariable
(
"id"
)
Long
id
)
{
int
count
=
feightTemplateService
.
deleteTemplate
(
id
);
if
(
count
==
1
)
{
return
CommonResult
.
success
(
null
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"根据id查询运费模板"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
PmsFeightTemplateVo
>
getItem
(
@PathVariable
(
"id"
)
Long
id
)
{
return
CommonResult
.
success
(
feightTemplateService
.
getTemplate
(
id
));
}
@ApiOperation
(
value
=
"添加模板"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@Validated
@RequestBody
PmsFeightTemplateParam
templateParam
,
BindingResult
result
)
{
CommonResult
commonResult
;
int
count
=
feightTemplateService
.
createTemplate
(
templateParam
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@ApiOperation
(
value
=
"更新模板"
)
@RequestMapping
(
value
=
"/update/{id}"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@PathVariable
(
"id"
)
Long
id
,
@Validated
@RequestBody
PmsFeightTemplateVo
feightTemplateVo
,
BindingResult
result
)
{
CommonResult
commonResult
;
int
count
=
feightTemplateService
.
updateTemplate
(
id
,
feightTemplateVo
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
}
mall-admin/src/main/java/com/macro/mall/controller/express/PmsMchtExtractTimeController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
express
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dao.ExtractTimeDao
;
import
com.macro.mall.model.PmsMchtExtractTime
;
import
com.macro.mall.service.express.PmsMchtExtractTimeService
;
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
;
@RestController
@Api
(
tags
=
"自提时间"
,
description
=
"自提时间"
)
@RequestMapping
(
"extract/times"
)
public
class
PmsMchtExtractTimeController
{
@Resource
private
PmsMchtExtractTimeService
mchtExtractTimeService
;
@GetMapping
@ApiOperation
(
value
=
"自提时间列表"
)
public
CommonResult
<
List
<
PmsMchtExtractTime
>>
list
(
@ApiParam
(
"商家id"
)
@RequestParam
Long
mchtId
)
{
List
<
PmsMchtExtractTime
>
list
=
mchtExtractTimeService
.
list
(
mchtId
);
return
CommonResult
.
success
(
list
);
}
@PostMapping
@ApiOperation
(
value
=
"自提时间保存"
)
public
CommonResult
create
(
@RequestBody
ExtractTimeDao
extractTimeDao
)
{
CommonResult
commonResult
;
int
count
=
mchtExtractTimeService
.
create
(
extractTimeDao
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@PutMapping
@ApiOperation
(
value
=
"自提时间修改"
)
public
CommonResult
update
(
@RequestBody
PmsMchtExtractTime
extractTimeDao
)
{
CommonResult
commonResult
;
int
count
=
mchtExtractTimeService
.
update
(
extractTimeDao
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
@DeleteMapping
(
value
=
"{id}"
)
@ApiOperation
(
value
=
"自提时间删除"
)
public
CommonResult
delete
(
@PathVariable
Long
id
)
{
CommonResult
commonResult
;
int
count
=
mchtExtractTimeService
.
delete
(
id
);
if
(
count
==
1
)
{
commonResult
=
CommonResult
.
success
(
count
);
}
else
{
commonResult
=
CommonResult
.
failed
();
}
return
commonResult
;
}
}
mall-admin/src/main/java/com/macro/mall/controller/feedback/CmsFeedbackClassifyController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
feedback
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.CmsFeedbackClassify
;
import
com.macro.mall.service.feedback.CmsFeedbackClassifyService
;
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 CmsFeedbackClassifyController
* @Description TODO
* @Author cxh
* @Date 2020/4/8 9:56
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"意见反馈分类"
,
description
=
"意见反馈分类"
)
@RequestMapping
(
value
=
"/feedback/classify"
)
public
class
CmsFeedbackClassifyController
{
@Resource
private
CmsFeedbackClassifyService
cmsFeedbackClassifyService
;
@ApiOperation
(
value
=
"添加分类"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
addClassify
(
@RequestBody
CmsFeedbackClassify
classify
){
Integer
count
=
cmsFeedbackClassifyService
.
addClassify
(
classify
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"编辑分类"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateClassify
(
@RequestBody
CmsFeedbackClassify
classify
){
Integer
count
=
cmsFeedbackClassifyService
.
updateClassify
(
classify
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"删除分类"
)
@RequestMapping
(
value
=
"del"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
delClassify
(
@RequestParam
Long
id
){
Integer
count
=
cmsFeedbackClassifyService
.
delClassify
(
id
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取分类列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
CmsFeedbackClassify
>>
getClassifyList
(){
List
<
CmsFeedbackClassify
>
classifies
=
cmsFeedbackClassifyService
.
getClassifyList
();
return
CommonResult
.
success
(
classifies
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/feedback/CmsFeedbackController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
feedback
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.vo.FeedBackVo
;
import
com.macro.mall.model.CmsFeedback
;
import
com.macro.mall.service.feedback.CmsFeedbackService
;
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 CmsFeedbackController
* @Description TODO
* @Author cxh
* @Date 2020/4/8 10:50
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"意见反馈"
,
description
=
"意见反馈"
)
@RequestMapping
(
value
=
"/feedback"
)
public
class
CmsFeedbackController
{
@Resource
private
CmsFeedbackService
cmsFeedbackService
;
@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
=
"/del"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
delFeedBack
(
@RequestParam
Long
id
){
Integer
count
=
cmsFeedbackService
.
delFeedback
(
id
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取反馈详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CmsFeedback
>
getDetail
(
@RequestParam
Long
id
){
CmsFeedback
feedback
=
cmsFeedbackService
.
getDetail
(
id
);
return
CommonResult
.
success
(
feedback
);
}
@ApiOperation
(
value
=
"获取反馈列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
FeedBackVo
>>
getFeedbaxkList
(
Long
classifyId
,
String
keyword
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
FeedBackVo
>
feedbacks
=
cmsFeedbackService
.
getFeedbackList
(
classifyId
,
keyword
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
feedbacks
));
}
@ApiOperation
(
value
=
"反馈处理"
)
@RequestMapping
(
value
=
"/manage"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
manageFeedback
(
@RequestBody
CmsFeedback
feedback
){
Integer
count
=
cmsFeedbackService
.
manageFeedback
(
feedback
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/finance/FinanceOrderController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
finance
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.Vo.SettlementMoneyVo
;
import
com.macro.mall.model.vo.OmsOrderSonVo
;
import
com.macro.mall.service.order.OmsOrderSonService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
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
=
"财务管理-待结算订单"
)
@RequestMapping
(
"finance/order"
)
public
class
FinanceOrderController
{
@Resource
private
OmsOrderSonService
orderSonService
;
@GetMapping
@ApiOperation
(
"待结算列表"
)
public
CommonResult
<
CommonPage
<
OmsOrderSonVo
>>
queryFinanceOrder
(
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
OmsOrderSonVo
>
orderSonList
=
orderSonService
.
queryFinanceOrder
(
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderSonList
));
}
@GetMapping
(
value
=
"info"
)
@ApiOperation
(
"查询供应商可以获取的金额"
)
public
CommonResult
<
SettlementMoneyVo
>
getSettlementMoney
()
{
SettlementMoneyVo
vo
=
orderSonService
.
getSettlementMoney
();
if
(
vo
!=
null
)
{
return
CommonResult
.
success
(
vo
);
}
return
CommonResult
.
failed
();
}
}
\ No newline at end of file
mall-admin/src/main/java/com/macro/mall/controller/finance/PmsMchtAccountController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
finance
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.component.DgbSecurityUserHelper
;
import
com.macro.mall.domain.dto.mcht.*
;
import
com.macro.mall.domain.vo.mcht.FinanceOverviewVo
;
import
com.macro.mall.domain.vo.mcht.PmsMchtAccountVo
;
import
com.macro.mall.domain.vo.pay.PayParamVo
;
import
com.macro.mall.model.OmsPayOrder
;
import
com.macro.mall.model.UmsAdmin
;
import
com.macro.mall.service.mcht.PmsMchtAccountService
;
import
com.macro.mall.service.pay.OmsPayOrderService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"财务管理-供应商账户"
)
@RequestMapping
(
"mch/account"
)
public
class
PmsMchtAccountController
{
@Resource
private
PmsMchtAccountService
mchtAccountService
;
@Resource
private
OmsPayOrderService
payOrderService
;
@GetMapping
@ApiOperation
(
"供应商保证金管理"
)
public
CommonResult
<
CommonPage
<
PmsMchtAccountVo
>>
queryAllAccount
(
@ModelAttribute
QueryAllAccountParam
param
,
@RequestParam
(
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsMchtAccountVo
>
list
=
mchtAccountService
.
getAllAccount
(
param
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@GetMapping
(
value
=
"single"
)
@ApiOperation
(
"获取当前商户的资金"
)
public
CommonResult
<
PmsMchtAccountVo
>
getAccount
()
{
UmsAdmin
admin
=
DgbSecurityUserHelper
.
getCurrentUser
();
PmsMchtAccountVo
account
=
mchtAccountService
.
getByAdminId
(
admin
.
getId
());
return
CommonResult
.
success
(
account
);
}
@GetMapping
(
value
=
"overview"
)
@ApiOperation
(
"获取当前商户的财务总览"
)
public
CommonResult
<
FinanceOverviewVo
>
overview
(
FinanceOverviewParam
param
)
{
UmsAdmin
admin
=
DgbSecurityUserHelper
.
getCurrentUser
();
FinanceOverviewVo
financeOverviewVo
=
mchtAccountService
.
getOverviewByAdminId
(
admin
.
getId
(),
param
);
return
CommonResult
.
success
(
financeOverviewVo
);
}
@GetMapping
(
value
=
"pay/order"
)
@ApiOperation
(
"获取当前支付状态"
)
public
CommonResult
<
OmsPayOrder
>
getPayOrder
(
@ModelAttribute
PayOrderQueryParam
param
)
{
OmsPayOrder
payOrder
=
payOrderService
.
getPayOrder
(
param
);
return
CommonResult
.
success
(
payOrder
);
}
@PostMapping
(
value
=
"pay"
)
@ApiOperation
(
"缴纳保证金"
)
public
CommonResult
<
PayParamVo
>
payMargin
(
@RequestBody
PayMarginParam
param
,
@ApiIgnore
HttpServletRequest
request
)
{
String
host
=
request
.
getRemoteAddr
();
String
basePath
=
request
.
getScheme
()
+
"://"
+
request
.
getServerName
()
+
":"
+
request
.
getServerPort
()
+
request
.
getContextPath
();
param
.
setBasePath
(
basePath
);
param
.
setHost
(
host
);
PayParamVo
vo
=
mchtAccountService
.
payMargin
(
param
);
return
CommonResult
.
success
(
vo
);
}
@PostMapping
(
value
=
"deduction"
)
@ApiOperation
(
"保证金扣款"
)
public
CommonResult
deduction
(
@RequestBody
MarginDeductionParam
param
)
{
return
mchtAccountService
.
deduction
(
param
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/finance/PmsMchtFundsDetailController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
finance
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.PmsMchtFundsDetailListParam
;
import
com.macro.mall.model.PmsMchtFundsDetail
;
import
com.macro.mall.service.finance.PmsMchtFundsDetailService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
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
=
"财务管理-资金明细"
)
@RequestMapping
(
"funds/detail"
)
public
class
PmsMchtFundsDetailController
{
@Resource
private
PmsMchtFundsDetailService
mchtFundsDetailService
;
@GetMapping
@ApiOperation
(
"列表"
)
public
CommonResult
<
CommonPage
<
PmsMchtFundsDetail
>>
list
(
PmsMchtFundsDetailListParam
queryParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsMchtFundsDetail
>
orderList
=
mchtFundsDetailService
.
queryList
(
queryParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/finance/PmsMchtSettlementController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
finance
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.settlement.PmsMchtSettlementListParam
;
import
com.macro.mall.domain.vo.settlement.PmsMchtSettlementVo
;
import
com.macro.mall.dto.PmsMchtSettlementDetailListParam
;
import
com.macro.mall.dto.Vo.SettlementDetailVo
;
import
com.macro.mall.model.PmsMchtSettlementDetail
;
import
com.macro.mall.service.finance.PmsMchtSettlementService
;
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
;
@RestController
@Api
(
tags
=
"财务管理-供应商结算列表"
)
@RequestMapping
(
"settlement"
)
public
class
PmsMchtSettlementController
{
@Resource
private
PmsMchtSettlementService
settlementService
;
@GetMapping
@ApiOperation
(
"列表"
)
public
CommonResult
<
CommonPage
<
PmsMchtSettlementVo
>>
list
(
PmsMchtSettlementListParam
queryParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsMchtSettlementVo
>
orderList
=
settlementService
.
queryList
(
queryParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderList
));
}
@GetMapping
(
value
=
"detail/info/{settlementId}"
)
@ApiOperation
(
"结算订单明细头部的数据"
)
public
CommonResult
<
SettlementDetailVo
>
detailInfo
(
@ApiParam
(
"已结算订单id"
)
@PathVariable
Long
settlementId
)
{
SettlementDetailVo
settlementDetailVo
=
settlementService
.
getDetailInfo
(
settlementId
);
return
CommonResult
.
success
(
settlementDetailVo
);
}
@GetMapping
(
value
=
"detail"
)
@ApiOperation
(
"结算订单明细列表"
)
public
CommonResult
<
CommonPage
<
PmsMchtSettlementDetail
>>
detailList
(
PmsMchtSettlementDetailListParam
queryParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsMchtSettlementDetail
>
orderList
=
settlementService
.
queryDetailList
(
queryParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/finance/PmsMemberSettlementController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
finance
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.settlement.PmsMemberSettlementListParam
;
import
com.macro.mall.domain.vo.settlement.PmsMemberSettlementVo
;
import
com.macro.mall.dto.PmsMchtSettlementDetailListParam
;
import
com.macro.mall.dto.Vo.SettlementDetailVo
;
import
com.macro.mall.model.PmsMemberSettlementDetail
;
import
com.macro.mall.service.finance.PmsMemberSettlementService
;
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
;
@RestController
@Api
(
tags
=
"财务管理-会员结算列表"
)
@RequestMapping
(
"member/settlement"
)
public
class
PmsMemberSettlementController
{
@Resource
private
PmsMemberSettlementService
settlementService
;
@GetMapping
@ApiOperation
(
"列表"
)
public
CommonResult
<
CommonPage
<
PmsMemberSettlementVo
>>
list
(
PmsMemberSettlementListParam
queryParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsMemberSettlementVo
>
orderList
=
settlementService
.
queryList
(
queryParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderList
));
}
@GetMapping
(
"/achievementList"
)
@ApiOperation
(
"业绩列表"
)
public
CommonResult
<
CommonPage
<
PmsMemberSettlementVo
>>
achievementList
(
PmsMemberSettlementListParam
queryParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsMemberSettlementVo
>
achievementList
=
settlementService
.
queryAchievementList
(
queryParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
achievementList
));
}
@GetMapping
(
value
=
"detail/info/{settlementId}"
)
@ApiOperation
(
"结算订单明细头部的数据"
)
public
CommonResult
<
SettlementDetailVo
>
detailInfo
(
@ApiParam
(
"已结算订单id"
)
@PathVariable
Long
settlementId
)
{
SettlementDetailVo
settlementDetailVo
=
settlementService
.
getDetailInfo
(
settlementId
);
return
CommonResult
.
success
(
settlementDetailVo
);
}
@GetMapping
(
value
=
"detail"
)
@ApiOperation
(
"结算订单明细列表"
)
public
CommonResult
<
CommonPage
<
PmsMemberSettlementDetail
>>
detailList
(
PmsMchtSettlementDetailListParam
queryParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsMemberSettlementDetail
>
orderList
=
settlementService
.
queryDetailList
(
queryParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/integral/SmsIntegralGiftController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
integral
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.marketing.OmsIntegralGiftOrderListParam
;
import
com.macro.mall.domain.dto.marketing.SmsIntegralGiftDeliver
;
import
com.macro.mall.domain.vo.marketing.OmsIntegralGiftOrderVo
;
import
com.macro.mall.model.SmsIntegralGift
;
import
com.macro.mall.service.integral.OmsIntegralGiftOrderService
;
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
(
value
=
"integral/gifts"
)
public
class
SmsIntegralGiftController
{
@Resource
private
SmsIntegralGiftService
integralGiftService
;
@Resource
private
OmsIntegralGiftOrderService
integralGiftOrderService
;
@ApiOperation
(
"添加礼品"
)
@PostMapping
@ResponseBody
public
CommonResult
create
(
@RequestBody
SmsIntegralGift
gift
)
{
int
count
=
integralGiftService
.
create
(
gift
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"编辑礼品"
)
@PutMapping
@ResponseBody
public
CommonResult
update
(
@RequestBody
SmsIntegralGift
gift
)
{
int
count
=
integralGiftService
.
update
(
gift
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"上下架"
)
@PutMapping
(
value
=
"upAndDown"
)
@ResponseBody
public
CommonResult
upAndDown
(
@RequestBody
SmsIntegralGift
gift
)
{
int
count
=
integralGiftService
.
upAndDown
(
gift
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"根据名称分页查询积分礼品列表"
)
@GetMapping
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsIntegralGift
>>
getItemList
(
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsIntegralGift
>
giftList
=
integralGiftService
.
list
(
keyword
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
giftList
));
}
@ApiOperation
(
"礼品详情"
)
@GetMapping
(
value
=
"{id}"
)
@ResponseBody
public
CommonResult
<
SmsIntegralGift
>
getItemById
(
@PathVariable
Long
id
)
{
SmsIntegralGift
gift
=
integralGiftService
.
getItemById
(
id
);
return
CommonResult
.
success
(
gift
);
}
@ApiOperation
(
"根据名称分页查询兑换记录"
)
@GetMapping
(
value
=
"record"
)
@ResponseBody
public
CommonResult
<
CommonPage
<
OmsIntegralGiftOrderVo
>>
getExChangeRecordList
(
@ModelAttribute
OmsIntegralGiftOrderListParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
OmsIntegralGiftOrderVo
>
giftList
=
integralGiftOrderService
.
list
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
giftList
));
}
@ApiOperation
(
"发货"
)
@PutMapping
(
value
=
"deliver"
)
@ResponseBody
public
CommonResult
deliver
(
@RequestBody
SmsIntegralGiftDeliver
param
)
{
integralGiftOrderService
.
deliver
(
param
);
return
CommonResult
.
success
(
"发货成功"
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/integral/SysRechargeConfigController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
integral
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.vo.integral.SysRechargeConfigVo
;
import
com.macro.mall.model.SysRechargeConfig
;
import
com.macro.mall.service.integral.SysRechargeConfigService
;
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
(
value
=
"recharge/config"
)
public
class
SysRechargeConfigController
{
@Resource
private
SysRechargeConfigService
rechargeConfigService
;
@GetMapping
@ApiOperation
(
"列表"
)
public
CommonResult
<
List
<
SysRechargeConfigVo
>>
queryList
()
{
List
<
SysRechargeConfigVo
>
configList
=
rechargeConfigService
.
queryList
();
return
CommonResult
.
success
(
configList
);
}
@ApiOperation
(
"添加/更新充值配置"
)
@PostMapping
@ResponseBody
public
CommonResult
create
(
@RequestBody
List
<
SysRechargeConfig
>
configList
)
{
int
count
=
rechargeConfigService
.
create
(
configList
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@DeleteMapping
(
value
=
"{id}"
)
@ApiOperation
(
"删除充值配置"
)
public
CommonResult
delete
(
@PathVariable
Long
id
)
{
rechargeConfigService
.
delete
(
id
);
return
CommonResult
.
success
(
"删除成功"
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/integral/UmsIntegralController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
integral
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.UmsIntegralParam
;
import
com.macro.mall.dto.UmsIntegralResult
;
import
com.macro.mall.dto.UmsIntegrationConsumeSettingParam
;
import
com.macro.mall.model.UmsIntegrationChangeHistory
;
import
com.macro.mall.model.UmsIntegrationConsumeSetting
;
import
com.macro.mall.model.UmsIntegrationGetRules
;
import
com.macro.mall.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
(
value
=
"/integral"
)
public
class
UmsIntegralController
{
@Resource
private
UmsIntegralService
umsIntegralService
;
@ApiOperation
(
value
=
"获取会员积分列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
UmsIntegralResult
>>
getIntegralList
(
@ModelAttribute
UmsIntegralParam
umsIntegralParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
UmsIntegralResult
>
integralResults
=
umsIntegralService
.
getIntegralList
(
umsIntegralParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
integralResults
));
}
@ApiOperation
(
"查看会员积分记录"
)
@RequestMapping
(
value
=
"/record"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
UmsIntegrationChangeHistory
>>
getIntegralRecord
(
@ModelAttribute
UmsIntegralParam
umsIntegralParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
UmsIntegrationChangeHistory
>
histories
=
umsIntegralService
.
getIntegralRecord
(
umsIntegralParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
histories
));
}
@ApiOperation
(
value
=
"设置积分消费规则"
)
@RequestMapping
(
value
=
"/consumptionRule"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
setConsumptionRule
(
@RequestBody
UmsIntegrationConsumeSettingParam
consumeSettingParam
){
Integer
count
=
umsIntegralService
.
setConsumptionRule
(
consumeSettingParam
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取积分消费规则"
)
@RequestMapping
(
value
=
"getConsumptionRule"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
UmsIntegrationConsumeSetting
>
getConsumptionRule
(){
UmsIntegrationConsumeSetting
consumeSetting
=
umsIntegralService
.
getConsumptionRule
();
return
CommonResult
.
success
(
consumeSetting
);
}
@ApiOperation
(
value
=
"获取积分规则列表"
)
@RequestMapping
(
value
=
"/getRules"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
UmsIntegrationGetRules
>>
getRules
(){
List
<
UmsIntegrationGetRules
>
rulesList
=
umsIntegralService
.
getRules
();
return
CommonResult
.
success
(
rulesList
);
}
@ApiOperation
(
value
=
"设置积分规则"
)
@RequestMapping
(
value
=
"/setRules"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
setRules
(
@RequestBody
UmsIntegrationGetRules
umsIntegrationGetRules
){
Integer
count
=
umsIntegralService
.
setRules
(
umsIntegrationGetRules
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"保存积分更改"
)
@RequestMapping
(
value
=
"/updateRules"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateRules
(
@RequestBody
List
<
UmsIntegrationGetRules
>
rulesList
){
Integer
count
=
umsIntegralService
.
updateRules
(
rulesList
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"删除积分规则"
)
@RequestMapping
(
value
=
"/delRules"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
delRules
(
@RequestParam
Long
rulesId
){
Integer
count
=
umsIntegralService
.
delRules
(
rulesId
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/mcht/OmsAdminComplaintApplicationController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
mcht
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.OmsComplaintApplicationParam
;
import
com.macro.mall.dto.Vo.AdminComplaintApplicationVo
;
import
com.macro.mall.model.OmsComplaintApplication
;
import
com.macro.mall.service.OmsComplaintApplicationService
;
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 OmsAdminComplaintApplicationController
* @Description
* @Date 2020/3/3 19:08
*/
@Controller
@Api
(
tags
=
"供应商投诉管理"
,
description
=
"供应商投诉管理"
)
@RequestMapping
(
"/complaint/application"
)
public
class
OmsAdminComplaintApplicationController
{
@Autowired
private
OmsComplaintApplicationService
complaintApplicationService
;
/**
* 投诉列表
*/
@ApiOperation
(
"投诉分页列表"
)
@RequestMapping
(
value
=
"/getList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
OmsComplaintApplication
>>
getList
(
OmsComplaintApplicationParam
complaintApplicationParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
OmsComplaintApplication
>
list
=
complaintApplicationService
.
getList
(
complaintApplicationParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
/**
* 投诉单查看
*/
@ApiOperation
(
"投诉单查看"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
OmsComplaintApplication
>
detail
(
@RequestParam
Long
id
){
OmsComplaintApplication
complaintApplication
=
complaintApplicationService
.
detail
(
id
);
return
CommonResult
.
success
(
complaintApplication
);
}
/**
* 提交申述
*/
@ApiOperation
(
"提交申述"
)
@RequestMapping
(
value
=
"/submit"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
submit
(
@RequestBody
AdminComplaintApplicationVo
adminComplaintApplicationVo
){
return
complaintApplicationService
.
submit
(
adminComplaintApplicationVo
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/mcht/PmsMchtPlatCategoryController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
mcht
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.MchtPlatCategoryResult
;
import
com.macro.mall.model.PmsMchtPlatCategory
;
import
com.macro.mall.service.mcht.PmsMchtPlatCategoryService
;
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
;
/**
* @author chenwf
* @date 2020/3/17
*/
@RestController
@Api
(
tags
=
"商家关联平台分类相关接口"
,
description
=
"商家关联平台分类相关接口"
)
@RequestMapping
(
value
=
"/mchtPlat"
)
public
class
PmsMchtPlatCategoryController
{
@Resource
private
PmsMchtPlatCategoryService
pmsMchtPlatCategoryService
;
@ApiOperation
(
value
=
"商家平台分类列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
MchtPlatCategoryResult
>>
list
(
@ApiParam
(
"商家id"
)
@RequestParam
Long
mchtId
,
@ApiParam
(
"父级类目id,没有默认0"
)
@RequestParam
Long
parentId
)
{
return
pmsMchtPlatCategoryService
.
list
(
mchtId
,
parentId
);
}
@ApiOperation
(
value
=
"添加商家平台分类"
)
@RequestMapping
(
value
=
"/create"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
create
(
@RequestBody
PmsMchtPlatCategory
pmsMchtPlatCategory
)
{
return
pmsMchtPlatCategoryService
.
createMchtCategory
(
pmsMchtPlatCategory
);
}
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestParam
Long
id
)
{
return
pmsMchtPlatCategoryService
.
delete
(
id
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/mcht/UmsAdminWithdrawalReviewController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
mcht
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.SmsResult
;
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.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
java.math.BigDecimal
;
import
java.util.List
;
/**
* @author yupengcheng
* @ClasssName UmsAdminWithdrawalReviewController
* @Description
* @Date 2020/2/27 17:55
*/
@Controller
@Api
(
tags
=
"供应商提现申请"
,
description
=
"供应商提现申请"
)
@RequestMapping
(
"/admin/withdrawal"
)
public
class
UmsAdminWithdrawalReviewController
{
@Autowired
private
UmsWithdrawalReviewService
withdrawalReviewService
;
@Autowired
private
UmsWithdrawalAmountService
withdrawalAmountService
;
@ApiOperation
(
"提现申请"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
add
(
@RequestBody
UmsWithdrawalReviewAddParam
withdrawalReview
){
return
withdrawalReviewService
.
add
(
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微信 , 2银行账户)"
,
dataType
=
"String"
,
required
=
true
,
paramType
=
"query"
)
})
public
CommonResult
verification
(
BigDecimal
amount
,
String
type
){
return
withdrawalReviewService
.
verification
(
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
.
selectList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@ApiOperation
(
"发送供应商短信验证码"
)
@RequestMapping
(
value
=
"/getAdminAuthCode"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
SmsResult
>
getAdminAuthCode
(){
return
withdrawalReviewService
.
getAdminAuthCode
();
}
@ApiOperation
(
"撤销"
)
@RequestMapping
(
value
=
"/revoke"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
revoke
(
Long
id
){
int
count
=
withdrawalReviewService
.
revoke
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
/**
* 获取提现手续费
*/
@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-admin/src/main/java/com/macro/mall/controller/mcht/UmsMchtHomeController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
mcht
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.product.PmsProductInfoResult
;
import
com.macro.mall.dto.UmsMchtHomeResult
;
import
com.macro.mall.service.mcht.UmsMchtHomeService
;
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.RestController
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Api
(
tags
=
"供应商首页"
,
description
=
"供应商首页"
)
@RequestMapping
(
value
=
"/mchtHome"
)
public
class
UmsMchtHomeController
{
@Resource
private
UmsMchtHomeService
umsMchtHomeService
;
@ApiOperation
(
value
=
"获取店铺商品排行"
)
@RequestMapping
(
value
=
"/sort"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
PmsProductInfoResult
>>
getProductInfoList
(){
List
<
PmsProductInfoResult
>
results
=
umsMchtHomeService
.
getProductInfoList
();
return
CommonResult
.
success
(
results
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/mcht/UmsMchtWithdrawAccountController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
mcht
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.UmsMchtWithdrawAccountParam
;
import
com.macro.mall.model.UmsMchtWithdrawAccount
;
import
com.macro.mall.service.mcht.UmsMchtWithdrawAccountService
;
import
com.macro.mall.service.mcht.UmsWithdrawalReviewService
;
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 UmsMchtWithdrawAccountController
* @Description
* @Date 2020/2/28 11:00
*/
@Controller
@Api
(
tags
=
"供应商提现账户管理"
,
description
=
"供应商提现账户管理"
)
@RequestMapping
(
"/finance/mcht"
)
public
class
UmsMchtWithdrawAccountController
{
@Autowired
private
UmsMchtWithdrawAccountService
mchtWithdrawAccountService
;
@Autowired
private
UmsWithdrawalReviewService
withdrawalReviewService
;
@ApiOperation
(
"获取供应商提现账户"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
UmsMchtWithdrawAccount
>>
list
(){
List
<
UmsMchtWithdrawAccount
>
list
=
mchtWithdrawAccountService
.
list
();
return
CommonResult
.
success
(
list
);
}
@ApiOperation
(
"修改供应商提现账户"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@RequestBody
UmsMchtWithdrawAccountParam
mchtWithdrawAccountParam
){
return
mchtWithdrawAccountService
.
update
(
mchtWithdrawAccountParam
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/mchtcomment/PmsMchtCommentController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
mchtcomment
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.PmsCommentResult
;
import
com.macro.mall.dto.PmsMchtCommentResult
;
import
com.macro.mall.service.mchtcomment.PmsMchtCommentService
;
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 PmsMchtCommentController
* @Description TODO
* @Author cxh
* @Date 2020/3/30 16:40
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"供应商评价管理"
,
description
=
"供应商评价管理"
)
@RequestMapping
(
value
=
"/mcht/comment"
)
public
class
PmsMchtCommentController
{
@Resource
private
PmsMchtCommentService
pmsMchtCommentService
;
@ApiOperation
(
value
=
"获取供应商评分列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsCommentResult
>>
getCommentList
(
@ApiParam
(
"店铺名称"
)
String
shopName
,
@ApiParam
(
"1店铺编号2评价总分3商品描述4卖家服务态度5物流发货速度6订单评分)"
)
@RequestParam
Integer
sort
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsCommentResult
>
results
=
pmsMchtCommentService
.
getCommentList
(
shopName
,
sort
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
@ApiOperation
(
value
=
"获取店铺评论详情列表"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsMchtCommentResult
>>
getCommentScoreList
(
@ApiParam
(
"商家id"
)
@RequestParam
Long
mchtId
,
@ApiParam
(
"排序(1评论时间2商品描述3卖家态度4物流)"
)
@RequestParam
Integer
sort
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsMchtCommentResult
>
results
=
pmsMchtCommentService
.
getCommentScoreList
(
mchtId
,
sort
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/mchtdata/PmsMchtDataController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
mchtdata
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.component.DgbSecurityUserHelper
;
import
com.macro.mall.domain.dto.UmsAdminParam
;
import
com.macro.mall.domain.vo.*
;
import
com.macro.mall.domain.vo.PmsMchtShopInfoResult
;
import
com.macro.mall.model.*
;
import
com.macro.mall.service.mcht.PmsMchtShopInfoService
;
import
com.macro.mall.service.system.UmsAdminService
;
import
io.swagger.annotations.*
;
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
(
"/mch/data"
)
public
class
PmsMchtDataController
{
@Resource
private
PmsMchtShopInfoService
pmsMchtShopInfoService
;
@Resource
private
UmsAdminService
umsAdminService
;
@ApiOperation
(
"商家入驻申请--平台添加供应商"
)
@RequestMapping
(
value
=
"/apply"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
mchtApply
(
@RequestBody
UmsAdminParam
umsAdminParam
){
umsAdminService
.
register
(
umsAdminParam
);
return
CommonResult
.
success
(
null
);
}
@ApiOperation
(
"入驻申请--供应商自己申请"
)
@RequestMapping
(
value
=
"/doApply"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
doMchtApply
(
@RequestBody
UmsAdminParam
umsAdminParam
){
UmsAdmin
umsAdmin
=
DgbSecurityUserHelper
.
getCurrentUser
();
pmsMchtShopInfoService
.
saveMchtInfo
(
umsAdmin
,
umsAdminParam
);
return
CommonResult
.
success
(
null
);
}
@ApiOperation
(
"商家入驻申请列表"
)
@RequestMapping
(
value
=
"/auditlist"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsMchtAuditList
>>
getMchtAuditList
(
@ModelAttribute
PmsMchtAuditList
pmsMchtAuditList
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsMchtAuditList
>
mchtAuditLists
=
pmsMchtShopInfoService
.
getMchtAuditList
(
pmsMchtAuditList
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
mchtAuditLists
));
}
@ApiOperation
(
"获取供应商资质详情"
)
@RequestMapping
(
value
=
"/auditdetail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsMchtAuditDetailResult
>
getMchtAuditDetail
(
@RequestParam
Long
appiyId
){
PmsMchtAuditDetailResult
pmsMchtAuditDetailResult
=
pmsMchtShopInfoService
.
getMchtAuditDetail
(
appiyId
);
return
CommonResult
.
success
(
pmsMchtAuditDetailResult
);
}
@ApiOperation
(
"商家入驻审核"
)
@RequestMapping
(
value
=
"/mchtaudit"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
mchtAudit
(
@RequestBody
PmsMchtAuditLog
pmsMchtAuditLog
)
throws
Exception
{
Integer
count
=
pmsMchtShopInfoService
.
mchtAudit
(
pmsMchtAuditLog
.
getApplyId
(),
pmsMchtAuditLog
.
getAudit
(),
pmsMchtAuditLog
.
getAuditType
(),
pmsMchtAuditLog
.
getAuditNote
());
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"店铺申请列表"
)
@RequestMapping
(
value
=
"/shoplist"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsMchtShopInfoChildren
>>
getMchtShopInfoList
(
@ModelAttribute
PmsMchtShopInfo
pmsMchtShopInfo
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsMchtShopInfoChildren
>
shopInfoList
=
pmsMchtShopInfoService
.
getShopList
(
pmsMchtShopInfo
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
shopInfoList
));
}
@ApiOperation
(
"获取店铺详情"
)
@RequestMapping
(
value
=
"/shopdetail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsMchtShopInfoResult
>
getMchtShopInfoDetail
(
@RequestParam
Long
shopId
){
PmsMchtShopInfoResult
pmsMchtShopInfoResult
=
pmsMchtShopInfoService
.
getShopDetail
(
shopId
);
return
CommonResult
.
success
(
pmsMchtShopInfoResult
);
}
@ApiOperation
(
"店铺审核"
)
@RequestMapping
(
value
=
"/shopaudit"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
shopAudit
(
@RequestBody
PmsMchtAuditLog
pmsMchtAuditLog
)
throws
Exception
{
Integer
count
=
pmsMchtShopInfoService
.
shopAudit
(
pmsMchtAuditLog
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"获取对应类目行业资质证书"
)
@RequestMapping
(
value
=
"/categorycard"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"categoryId"
,
value
=
"类目id"
,
required
=
true
,
dataType
=
"long"
,
paramType
=
"query"
)
})
public
CommonResult
<
List
<
PmsProductCategoryCard
>>
getCategoryCard
(
Long
categoryId
){
List
<
PmsProductCategoryCard
>
categoryCards
=
pmsMchtShopInfoService
.
getCategoryCard
(
categoryId
);
return
CommonResult
.
success
(
categoryCards
);
}
@ApiOperation
(
value
=
"供应商账户启用/禁用"
)
@RequestMapping
(
value
=
"/setAccount"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
setAccount
(
Long
mchtId
,
Integer
status
){
Integer
count
=
pmsMchtShopInfoService
.
setAccount
(
mchtId
,
status
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"删除供应商信息"
)
@RequestMapping
(
value
=
"/delInfo"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
delMchtShopInfo
(
@RequestParam
Long
mchtId
){
pmsMchtShopInfoService
.
delMchtInfo
(
mchtId
);
return
CommonResult
.
success
(
1
);
}
@ApiOperation
(
value
=
"编辑店铺信息"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateShopInfo
(
@RequestBody
PmsShopInfoParam
pmsShopInfoParam
){
Integer
count
=
pmsMchtShopInfoService
.
updateShopInfo
(
pmsShopInfoParam
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"编辑供应商信息"
)
@RequestMapping
(
value
=
"/updateMcht"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateMchtInfo
(
@RequestBody
PmsMchtAptitudeInfo
pmsMchtAptitudeInfo
)
throws
Exception
{
Integer
count
=
pmsMchtShopInfoService
.
updateMchtInfo
(
pmsMchtAptitudeInfo
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取当前登录供应商审核信息"
)
@RequestMapping
(
value
=
"/getInfo"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsMchtAuditInfoResult
>
getMchtAuditInfo
(){
PmsMchtAuditInfoResult
result
=
pmsMchtShopInfoService
.
getMchtAuditInfo
();
return
CommonResult
.
success
(
result
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/member/UmsMemberAccountController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
member
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.ManualRechargeParam
;
import
com.macro.mall.domain.vo.member.QueryAllAmountVo
;
import
com.macro.mall.domain.vo.member.UmsAmountChangeHistorySummaryVo
;
import
com.macro.mall.domain.vo.member.UmsAmountChangeHistoryVo
;
import
com.macro.mall.model.dto.MemberUpgradeRecordParam
;
import
com.macro.mall.model.dto.QueryAllAmountParam
;
import
com.macro.mall.service.member.UmsMemberAccountService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 会员实名认证管理Controller
* Created by macro on 2018/8/3.
*/
@RestController
@Api
(
tags
=
"会员账户管理"
)
@RequestMapping
(
"member/account"
)
public
class
UmsMemberAccountController
{
@Resource
private
UmsMemberAccountService
memberAccountService
;
@ApiOperation
(
"手动充值"
)
@PostMapping
(
value
=
"manual/recharge"
)
public
CommonResult
manualRecharge
(
@RequestBody
ManualRechargeParam
param
)
{
memberAccountService
.
manualRecharge
(
param
);
return
CommonResult
.
success
(
"充值成功"
);
}
@ApiOperation
(
"会员充值汇总"
)
@GetMapping
(
value
=
"amount/history/summary"
)
public
CommonResult
<
UmsAmountChangeHistorySummaryVo
>
queryAmountHistory
(
@ModelAttribute
MemberUpgradeRecordParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
UmsAmountChangeHistorySummaryVo
summaryVo
=
memberAccountService
.
queryMemberAmountHistorySummary
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
summaryVo
);
}
@ApiOperation
(
"会员帐户资金列表"
)
@GetMapping
(
value
=
"amount"
)
public
CommonResult
<
QueryAllAmountVo
>
queryAllAmount
(
@ModelAttribute
QueryAllAmountParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
QueryAllAmountVo
summaryVo
=
memberAccountService
.
queryAllAmount
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
summaryVo
);
}
@ApiOperation
(
"会员资金明细"
)
@GetMapping
public
CommonResult
<
CommonPage
<
UmsAmountChangeHistoryVo
>>
queryAccountDetail
(
@ModelAttribute
MemberUpgradeRecordParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
UmsAmountChangeHistoryVo
>
list
=
memberAccountService
.
queryAccountDetail
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/member/UmsMemberController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
member
;
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.UmsMemberReview
;
import
com.macro.mall.domain.dto.member.UmsMemberTagParam
;
import
com.macro.mall.domain.vo.UmsMemberVo
;
import
com.macro.mall.domain.vo.member.UmsMemberTagVo
;
import
com.macro.mall.model.UmsMember
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.quanxing.UmsMemberDto
;
import
com.macro.mall.service.member.UmsMemberService
;
import
com.macro.mall.service.member.UmsMemberTagService
;
import
io.swagger.annotations.*
;
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 2018/8/3.
*/
@Controller
@Api
(
tags
=
"权星后台_会员相关接口"
,
description
=
"权星后台_会员相关接口"
)
@RequestMapping
(
"/member"
)
public
class
UmsMemberController
{
@Autowired
private
UmsMemberService
memberService
;
@Resource
private
UmsMemberTagService
memberTagService
;
@ApiOperation
(
"权星后台_插入会员"
)
@RequestMapping
(
value
=
"/insertMember"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
insertMember
(
@ApiParam
(
"手机号"
)
@RequestParam
(
"phone"
)
String
phone
,
@ApiParam
(
"用户名"
)
@RequestParam
(
"username"
)
String
username
,
@ApiParam
(
"名字"
)
@RequestParam
(
"name"
)
String
name
,
@ApiParam
(
"账户类型(0管理员1供应商2分销商)"
)
@RequestParam
(
"accouuntType"
)
Integer
accouuntType
,
@ApiParam
(
"密码"
)
@RequestParam
(
"password"
)
String
password
,
@ApiParam
(
"结算周期 1(7天) 2(15天) 3(30天)"
)
@RequestParam
(
name
=
"cycleType"
,
required
=
false
)
Integer
cycleType
,
@ApiParam
(
"结算方式 1(指定账期1 ) 2( 指定账期2 ) 3(指定账期3)"
)
@RequestParam
(
name
=
"payType"
,
required
=
false
)
Integer
payType
,
@ApiParam
(
"个性签名(说明)"
)
@RequestParam
(
name
=
"personalizedSignature"
,
required
=
false
)
String
personalizedSignature
,
@ApiParam
(
"邮箱"
)
@RequestParam
(
name
=
"email"
,
required
=
false
)
String
email
){
UmsMember
umsMember
=
new
UmsMember
();
umsMember
.
setPhone
(
phone
);
umsMember
.
setUsername
(
username
);
umsMember
.
setName
(
name
);
umsMember
.
setAccouuntType
(
accouuntType
);
umsMember
.
setPassword
(
password
);
umsMember
.
setCycleType
(
cycleType
);
umsMember
.
setPayType
(
payType
);
umsMember
.
setPersonalizedSignature
(
personalizedSignature
);
umsMember
.
setEmail
(
email
);
ResultMsg
res
=
this
.
memberService
.
insertMember
(
umsMember
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星后台_得到商家会员信息"
)
@RequestMapping
(
value
=
"/getMerchantMember"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
List
<
UmsMember
>>
getMerchantMember
(
@ApiParam
(
"传入2即可 账户类型(0管理员1供应商2分销商)"
)
@RequestParam
(
"accouuntType"
)
Integer
accouuntType
){
return
CommonResult
.
success
(
this
.
memberService
.
getMemberListByAccountType
(
accouuntType
));
}
@ApiOperation
(
"权星后台_查询会员分页数据"
)
@ResponseBody
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
UmsMemberDto
>>
getPageList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"pageNum"
)
Integer
pageNum
,
@ApiParam
(
"每页大小"
)
@RequestParam
(
"pageSize"
)
Integer
pageSize
,
@ApiParam
(
"不传则查询所有角色 账户类型(0管理员1供应商2分销商)"
)
@RequestParam
(
"accouuntType"
)
Integer
accouuntType
,
@ApiParam
(
"名字"
)
@RequestParam
(
"name"
)
String
name
,
@ApiParam
(
"手机号"
)
@RequestParam
(
"phone"
)
String
phone
,
@ApiParam
(
"启用禁用"
)
@RequestParam
(
"status"
)
Integer
status
){
return
CommonResult
.
success
(
this
.
memberService
.
getPageList
(
pageNum
,
pageSize
,
accouuntType
,
name
,
phone
,
status
));
}
@ApiOperation
(
"权星后台_根据会员id查询一条会员数据"
)
@RequestMapping
(
value
=
"/selectOneById"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
UmsMember
>
selectOneById
(
@ApiParam
(
"id"
)
@RequestParam
(
"id"
)
Long
id
){
return
CommonResult
.
success
(
this
.
memberService
.
selectOneById
(
id
));
}
@ApiOperation
(
"权星后台_根据会员id修改一条会员数据"
)
@RequestMapping
(
value
=
"/updateOneById"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateOneById
(
@ApiParam
(
"会员对象,传入Id,以及对应的要修改的值.例如帐号启用状态:0->禁用;1->启用 禁用账号在对应的字段传入0"
)
@RequestBody
UmsMember
umsMember
){
ResultMsg
res
=
this
.
memberService
.
updateOtherById
(
umsMember
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
}
mall-admin/src/main/java/com/macro/mall/controller/member/UmsMemberLevelController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
member
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.vo.member.MemberLevelDueRecordVo
;
import
com.macro.mall.domain.vo.member.MemberLevelRecordVo
;
import
com.macro.mall.model.UmsMemberLevel
;
import
com.macro.mall.model.dto.MemberUpgradeRecordParam
;
import
com.macro.mall.service.member.MemberLevelRecordService
;
import
com.macro.mall.service.member.UmsMemberLevelService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 会员等级管理Controller
* Created by macro on 2018/4/26.
*/
@RestController
@Api
(
tags
=
"会员等级管理"
,
description
=
"会员等级管理"
)
@RequestMapping
(
"memberLevels"
)
public
class
UmsMemberLevelController
{
@Resource
private
UmsMemberLevelService
memberLevelService
;
@Resource
private
MemberLevelRecordService
memberLevelRecordService
;
@GetMapping
@ApiOperation
(
"查询所有会员等级"
)
@ResponseBody
public
CommonResult
<
List
<
UmsMemberLevel
>>
list
()
{
List
<
UmsMemberLevel
>
memberLevelList
=
memberLevelService
.
list
(
null
);
return
CommonResult
.
success
(
memberLevelList
);
}
@PostMapping
@ApiOperation
(
"会员等级保存/修改"
)
@ResponseBody
public
CommonResult
save
(
@RequestBody
UmsMemberLevel
level
)
{
memberLevelService
.
save
(
level
);
return
CommonResult
.
success
(
"保存成功"
);
}
@DeleteMapping
(
value
=
"{id}"
)
@ApiOperation
(
"会员等级删除"
)
@ResponseBody
public
CommonResult
save
(
@PathVariable
Long
id
)
{
memberLevelService
.
delete
(
id
);
return
CommonResult
.
success
(
"删除成功"
);
}
@GetMapping
(
value
=
"upgrade/record"
)
@ApiOperation
(
"会员付费升级汇总"
)
public
CommonResult
<
MemberLevelRecordVo
>
getUpgradeRecord
(
@ModelAttribute
MemberUpgradeRecordParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
MemberLevelRecordVo
memberLevelRecordVo
=
memberLevelRecordService
.
queryMemberLevelRecordList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
memberLevelRecordVo
);
}
@GetMapping
(
value
=
"due/record"
)
@ApiOperation
(
"即将到期会员付费汇总"
)
public
CommonResult
<
MemberLevelDueRecordVo
>
queryDueRecord
(
@ModelAttribute
MemberUpgradeRecordParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
MemberLevelDueRecordVo
memberLevelRecordVo
=
memberLevelService
.
queryDueRecord
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
memberLevelRecordVo
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/member/UmsMemberPhoneReviewController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
member
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.UmsMemberPhoneReviewParam
;
import
com.macro.mall.service.UmsMemberPhoneReviewService
;
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.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 yupengcheng
* @ClasssName UmsMemberPhoneReviewController
* @Description
* @Date 2020/2/22 16:33
*/
@Controller
@Api
(
tags
=
"会员注册手机更换管理"
,
description
=
"会员注册手机更换管理"
)
@RequestMapping
(
"/member/phone"
)
public
class
UmsMemberPhoneReviewController
{
@Resource
private
UmsMemberPhoneReviewService
memberPhoneReviewService
;
@ApiOperation
(
"实名认证审核列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
UmsMemberPhoneReviewParam
>>
list
(
@RequestParam
(
value
=
"status"
)
String
status
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
UmsMemberPhoneReviewParam
>
list
=
memberPhoneReviewService
.
list
(
status
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@ApiOperation
(
"审核"
)
@RequestMapping
(
value
=
"/review"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
review
(
@RequestParam
(
value
=
"id"
)
Long
id
,
@RequestParam
(
value
=
"status"
)
String
status
){
return
memberPhoneReviewService
.
review
(
id
,
status
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/member/UmsMemberTagController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
member
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.member.UmsMemberTagListParam
;
import
com.macro.mall.model.UmsMemberTag
;
import
com.macro.mall.service.member.UmsMemberTagService
;
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
(
"member/tags"
)
public
class
UmsMemberTagController
{
@Resource
private
UmsMemberTagService
memberTagService
;
@ApiOperation
(
"列表"
)
@GetMapping
public
CommonResult
<
CommonPage
<
UmsMemberTag
>>
queryList
(
@ModelAttribute
UmsMemberTagListParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
UmsMemberTag
>
list
=
memberTagService
.
queryList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@PostMapping
@ApiOperation
(
"新增标签"
)
public
CommonResult
create
(
@RequestBody
UmsMemberTag
tag
)
{
memberTagService
.
create
(
tag
);
return
CommonResult
.
success
(
"创建成功"
);
}
@PutMapping
@ApiOperation
(
"修改标签"
)
public
CommonResult
update
(
@RequestBody
UmsMemberTag
tag
)
{
memberTagService
.
update
(
tag
);
return
CommonResult
.
success
(
"修改成功"
);
}
@DeleteMapping
(
value
=
"{id}"
)
@ApiOperation
(
"删除标签"
)
public
CommonResult
delete
(
@PathVariable
Long
id
)
{
memberTagService
.
delete
(
id
);
return
CommonResult
.
success
(
"删除成功"
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/message/CmsMessageController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
message
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.CmsMessageGetParam
;
import
com.macro.mall.dto.CmsMessageParam
;
import
com.macro.mall.model.CmsMessage
;
import
com.macro.mall.service.message.CmsMessageService
;
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
(
"/cmsmessage"
)
public
class
CmsMessageController
{
@Resource
private
CmsMessageService
cmsMessageService
;
@ApiOperation
(
"新建通告"
)
@RequestMapping
(
value
=
"/put"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
putMessage
(
@RequestBody
CmsMessageParam
cmsMessageParam
){
Integer
count
=
cmsMessageService
.
putMessage
(
cmsMessageParam
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"查询公告列表"
)
@RequestMapping
(
value
=
"getList"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
CmsMessage
>>
getMessageList
(
@ModelAttribute
CmsMessageGetParam
cmsMessageGetParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
CmsMessage
>
messages
=
cmsMessageService
.
getMessageList
(
cmsMessageGetParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
messages
));
}
@ApiOperation
(
"获取通告详情"
)
@RequestMapping
(
value
=
"getDetail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CmsMessage
>
getMessageDetail
(
@RequestParam
Long
messageId
){
CmsMessage
cmsMessage
=
cmsMessageService
.
getMessageDetail
(
messageId
);
return
CommonResult
.
success
(
cmsMessage
);
}
@ApiOperation
(
"删除通告"
)
@RequestMapping
(
value
=
"delete"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
deleteMessage
(
@RequestParam
Long
messageId
){
Integer
count
=
cmsMessageService
.
deleteMessage
(
messageId
);
return
CommonResult
.
success
(
count
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/messageset/EmailSetController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
messageset
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.CmsEmailSet
;
import
com.macro.mall.service.messageset.EmailService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
/**
* @ClassName EmailSetController
* @Description TODO
* @Author cxh
* @Date 2020/4/9 16:03
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"邮件通知配置"
,
description
=
"邮件通知配置"
)
@RequestMapping
(
value
=
"/email/set"
)
public
class
EmailSetController
{
@Resource
private
EmailService
emailService
;
@ApiOperation
(
value
=
"获取配置信息"
)
@RequestMapping
(
value
=
"/get"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CmsEmailSet
>
getEmailSet
(){
CmsEmailSet
cmsEmailSet
=
emailService
.
getEmailSet
();
return
CommonResult
.
success
(
cmsEmailSet
);
}
@ApiOperation
(
value
=
"更新设置"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateEmailSet
(
@RequestBody
CmsEmailSet
cmsEmailSet
){
Integer
count
=
emailService
.
updateEmailSet
(
cmsEmailSet
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"邮箱测试"
)
@RequestMapping
(
value
=
"/send"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
sedEmailTest
(
@RequestParam
String
email
){
Integer
count
=
emailService
.
sendEmailTest
(
email
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/messageset/SmsSetController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
messageset
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.CmsSmsSet
;
import
com.macro.mall.service.messageset.SmsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
/**
* @ClassName SmsSetController
* @Description TODO
* @Author cxh
* @Date 2020/4/9 11:14
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"手机短息设置"
,
description
=
"手机短息设置"
)
@RequestMapping
(
value
=
"/smsset"
)
public
class
SmsSetController
{
@Resource
private
SmsService
smsService
;
@ApiOperation
(
value
=
"添加设置"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
addSet
(
@RequestBody
CmsSmsSet
cmsSmsSet
){
Integer
count
=
smsService
.
smsSet
(
cmsSmsSet
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取短息设置"
)
@RequestMapping
(
value
=
"/getSms"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CmsSmsSet
>
getSmsSet
(){
CmsSmsSet
cmsSmsSet
=
smsService
.
getSmsSet
();
return
CommonResult
.
success
(
cmsSmsSet
);
}
@ApiOperation
(
value
=
"更新设置"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateSmsSet
(
@RequestBody
CmsSmsSet
cmsSmsSet
){
Integer
count
=
smsService
.
updateSmsSet
(
cmsSmsSet
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"短信测试"
)
@RequestMapping
(
value
=
"/test"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
SmsTest
(
@RequestParam
String
phone
){
Integer
count
=
smsService
.
SmsTest
(
phone
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/order/OmsOrderController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
order
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.*
;
import
com.macro.mall.model.vo.OmsOrderSonDetail
;
import
com.macro.mall.model.vo.OmsOrderSonVo
;
import
com.macro.mall.service.order.OmsOrderService
;
import
com.macro.mall.service.order.OmsOrderSonService
;
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/10/11.
*/
@Controller
@Api
(
tags
=
"订单管理"
,
description
=
"订单管理"
)
@RequestMapping
(
"/order"
)
public
class
OmsOrderController
{
@Resource
private
OmsOrderService
orderService
;
@Resource
private
OmsOrderSonService
orderSonService
;
@ApiOperation
(
"查询订单"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
OmsOrderSonVo
>>
list
(
OmsOrderQueryParam
queryParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
OmsOrderSonVo
>
orderList
=
orderService
.
listV2
(
queryParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderList
));
}
@ApiOperation
(
"查询发货单"
)
@RequestMapping
(
value
=
"invoice/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
OmsOrderSonVo
>>
invoiceList
(
@ModelAttribute
InvoiceListParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
OmsOrderSonVo
>
orderList
=
orderService
.
invoiceList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderList
));
}
@ApiOperation
(
"核销记录"
)
@RequestMapping
(
value
=
"mention/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
OmsOrderSonVo
>>
mentionList
(
@ModelAttribute
OmsOrderQueryParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
OmsOrderSonVo
>
orderList
=
orderService
.
mentionList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
orderList
));
}
@ApiOperation
(
"供应商确认订单"
)
@PostMapping
(
value
=
"confirm/{orderSonId}"
)
@ResponseBody
public
CommonResult
confirm
(
@PathVariable
Long
orderSonId
)
{
int
count
=
orderSonService
.
machtConfirm
(
orderSonId
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"生成发货单"
)
@PostMapping
(
value
=
"invoice/{orderSonId}"
)
@ResponseBody
public
CommonResult
delivery
(
@PathVariable
Long
orderSonId
)
{
int
count
=
orderSonService
.
invoiceOrder
(
orderSonId
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"自提订单-核销"
)
@PostMapping
(
value
=
"write_off"
)
@ResponseBody
public
CommonResult
writeOff
(
@RequestBody
WriteOffOrderParam
param
)
{
int
count
=
orderSonService
.
writeOff
(
param
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量确认发货"
)
@RequestMapping
(
value
=
"/update/delivery"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delivery
(
@RequestBody
List
<
OmsOrderSonDeliveryParam
>
deliveryParamList
)
{
int
count
=
orderSonService
.
delivery
(
deliveryParamList
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"放弃订单"
)
@RequestMapping
(
value
=
"/give/up"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
giveUp
(
@RequestBody
GiveUpOrderParam
param
)
{
int
count
=
orderSonService
.
giveUpOrder
(
param
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"取消发货"
)
@RequestMapping
(
value
=
"/cancel/delivery"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
cancelDelivery
(
@RequestBody
CancelDeliveryParam
param
)
{
int
count
=
orderSonService
.
cancelDelivery
(
param
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量关闭订单"
)
@RequestMapping
(
value
=
"/update/close"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
close
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
,
@RequestParam
String
note
)
{
int
count
=
orderService
.
close
(
ids
,
note
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"批量删除订单"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
delete
(
@RequestParam
(
"ids"
)
List
<
Long
>
ids
)
{
int
count
=
orderService
.
delete
(
ids
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"获取订单详情:订单信息、商品信息、操作记录"
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
OmsOrderSonDetail
>
detail
(
@PathVariable
Long
id
)
{
OmsOrderSonDetail
orderDetailResult
=
orderService
.
detail
(
id
);
return
CommonResult
.
success
(
orderDetailResult
);
}
@ApiOperation
(
"修改收货人信息"
)
@RequestMapping
(
value
=
"/update/receiverInfo"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateReceiverInfo
(
@RequestBody
OmsReceiverInfoParam
receiverInfoParam
)
{
int
count
=
orderService
.
updateReceiverInfo
(
receiverInfoParam
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"修改订单费用信息"
)
@RequestMapping
(
value
=
"/update/moneyInfo"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateReceiverInfo
(
@RequestBody
OmsMoneyInfoParam
moneyInfoParam
)
{
int
count
=
orderService
.
updateMoneyInfo
(
moneyInfoParam
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"备注订单"
)
@RequestMapping
(
value
=
"/update/note"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateNote
(
@RequestParam
(
"id"
)
Long
id
,
@RequestParam
(
"note"
)
String
note
,
@RequestParam
(
"status"
)
Integer
status
)
{
int
count
=
orderService
.
updateNote
(
id
,
note
,
status
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
}
mall-admin/src/main/java/com/macro/mall/controller/platform/PmsFundsConfigController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
platform
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.vo.platform.PmsFundsConfigVo
;
import
com.macro.mall.service.platform.PmsFundsConfigService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Slf4j
@Api
(
tags
=
"保证金配置"
)
@RequestMapping
(
"funds/config"
)
public
class
PmsFundsConfigController
{
@Resource
private
PmsFundsConfigService
fundsConfigService
;
@GetMapping
@ApiOperation
(
"列表"
)
public
CommonResult
<
List
<
PmsFundsConfigVo
>>
getList
()
{
List
<
PmsFundsConfigVo
>
pmsFundsConfigVoList
=
fundsConfigService
.
queryList
();
return
CommonResult
.
success
(
pmsFundsConfigVoList
);
}
@PostMapping
@ApiOperation
(
"修改"
)
public
CommonResult
config
(
@RequestBody
List
<
PmsFundsConfigVo
>
pmsFundsConfigVoList
)
{
fundsConfigService
.
config
(
pmsFundsConfigVoList
);
return
CommonResult
.
success
(
"修改成功"
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/platform/PmsPlatformAccountController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
platform
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.platform.PmsPlatformAccountDetailParam
;
import
com.macro.mall.model.PmsPlatformAccountDetail
;
import
com.macro.mall.service.platform.PmsPlatformAccountService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Slf4j
@Api
(
tags
=
"平台资金明细"
)
@RequestMapping
(
"platform/account"
)
public
class
PmsPlatformAccountController
{
@Resource
private
PmsPlatformAccountService
platformAccountService
;
@GetMapping
(
value
=
"details"
)
@ApiOperation
(
"列表"
)
public
CommonResult
<
CommonPage
<
PmsPlatformAccountDetail
>>
getDetails
(
@ModelAttribute
PmsPlatformAccountDetailParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
PmsPlatformAccountDetail
>
details
=
platformAccountService
.
queryDetails
(
param
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
details
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/platform/PmsSearchWordController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
platform
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.platform.SearchRecordParam
;
import
com.macro.mall.domain.vo.platform.PmsSearchWordVo
;
import
com.macro.mall.service.platform.PmsSearchWordService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
@RestController
@Slf4j
@Api
(
tags
=
"检索记录"
)
@RequestMapping
(
"search/record"
)
public
class
PmsSearchWordController
{
@Resource
private
PmsSearchWordService
searchWordService
;
@GetMapping
@ApiOperation
(
"列表"
)
public
CommonResult
<
CommonPage
<
PmsSearchWordVo
>>
queryList
(
@ModelAttribute
SearchRecordParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsSearchWordVo
>
searchWordVoList
=
searchWordService
.
queryList
(
param
,
pageNum
,
pageSize
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
searchWordVoList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/productdata/PmsProductDataController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
productdata
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.PmsProductDataParam
;
import
com.macro.mall.dto.PmsProductDataResult
;
import
com.macro.mall.service.productdata.PmsProductDataService
;
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 PmsProductDataController
* @Description TODO
* @Author cxh
* @Date 2020/3/31 11:50
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"商品数据管理"
,
description
=
"商品数据管理"
)
@RequestMapping
(
value
=
"/product/data"
)
public
class
PmsProductDataController
{
@Resource
private
PmsProductDataService
pmsProductDataService
;
@ApiOperation
(
value
=
"获取商品参数数据"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsProductDataResult
>>
getProductData
(
@ModelAttribute
PmsProductDataParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsProductDataResult
>
results
=
pmsProductDataService
.
getProductDataList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/promotion/SmsFullReductionPromotionController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
promotion
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.promotion.SmsFullReductionPromotionDto
;
import
com.macro.mall.domain.dto.promotion.SmsFullReductionPromotionParam
;
import
com.macro.mall.domain.vo.promotion.SmsFullReductionPromotionVo
;
import
com.macro.mall.model.SmsFullReductionPromotion
;
import
com.macro.mall.service.promotion.SmsFullReductionPromotionService
;
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
@Api
(
tags
=
"满减活动管理"
)
@RequestMapping
(
"full/reductions"
)
public
class
SmsFullReductionPromotionController
{
@Resource
private
SmsFullReductionPromotionService
fullReductionPromotionService
;
@ApiOperation
(
"添加活动"
)
@PostMapping
@ResponseBody
public
CommonResult
create
(
@RequestBody
SmsFullReductionPromotionDto
fullReductionPromotion
)
{
int
count
=
fullReductionPromotionService
.
create
(
fullReductionPromotion
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"编辑活动信息"
)
@PutMapping
@ResponseBody
public
CommonResult
update
(
@RequestBody
SmsFullReductionPromotionDto
fullReductionPromotion
)
{
int
count
=
fullReductionPromotionService
.
update
(
fullReductionPromotion
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"删除活动信息"
)
@DeleteMapping
(
value
=
"{id}"
)
@ResponseBody
public
CommonResult
delete
(
@PathVariable
Long
id
)
{
int
count
=
fullReductionPromotionService
.
delete
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"获取活动详情"
)
@GetMapping
(
value
=
"/{id}"
)
@ResponseBody
public
CommonResult
<
SmsFullReductionPromotionVo
>
getItem
(
@PathVariable
Long
id
)
{
SmsFullReductionPromotionVo
flashPromotion
=
fullReductionPromotionService
.
getItem
(
id
);
return
CommonResult
.
success
(
flashPromotion
);
}
@ApiOperation
(
"根据活动名称分页查询"
)
@GetMapping
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsFullReductionPromotion
>>
getItemList
(
@ModelAttribute
SmsFullReductionPromotionParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsFullReductionPromotion
>
flashPromotionList
=
fullReductionPromotionService
.
list
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
flashPromotionList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/promotion/SmsSeckillPromotionController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
promotion
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.promotion.SmsFullReductionPromotionParam
;
import
com.macro.mall.domain.dto.promotion.SmsSeckillPromotionDto
;
import
com.macro.mall.domain.vo.promotion.SmsSeckillPromotionVo
;
import
com.macro.mall.model.SmsFullReductionPromotion
;
import
com.macro.mall.model.SmsSeckillPromotion
;
import
com.macro.mall.service.promotion.SmsSeckillPromotionService
;
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
@Api
(
tags
=
"秒杀活动管理"
)
@RequestMapping
(
"sec/kill"
)
public
class
SmsSeckillPromotionController
{
@Resource
private
SmsSeckillPromotionService
seckillPromotionService
;
@ApiOperation
(
"添加活动"
)
@PostMapping
@ResponseBody
public
CommonResult
create
(
@RequestBody
SmsSeckillPromotionDto
seckillPromotionDto
)
{
int
count
=
seckillPromotionService
.
create
(
seckillPromotionDto
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"编辑活动信息"
)
@PutMapping
@ResponseBody
public
CommonResult
update
(
@RequestBody
SmsSeckillPromotionDto
seckillPromotionDto
)
{
int
count
=
seckillPromotionService
.
update
(
seckillPromotionDto
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"删除活动信息"
)
@DeleteMapping
(
value
=
"{id}"
)
@ResponseBody
public
CommonResult
delete
(
@PathVariable
Long
id
)
{
int
count
=
seckillPromotionService
.
delete
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"获取活动详情"
)
@GetMapping
(
value
=
"/{id}"
)
@ResponseBody
public
CommonResult
<
SmsSeckillPromotionVo
>
getItem
(
@PathVariable
Long
id
)
{
SmsSeckillPromotionVo
seckillPromotion
=
seckillPromotionService
.
getItem
(
id
);
return
CommonResult
.
success
(
seckillPromotion
);
}
@ApiOperation
(
"根据活动名称分页查询"
)
@GetMapping
@ResponseBody
public
CommonResult
<
CommonPage
<
SmsSeckillPromotion
>>
getItemList
(
@ModelAttribute
SmsFullReductionPromotionParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
SmsSeckillPromotion
>
seckillPromotionList
=
seckillPromotionService
.
list
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
seckillPromotionList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/promotion/SmsSeckillPromotionPlatformTimeController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
promotion
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.promotion.SmsSeckillPromotionPlatformTimeDto
;
import
com.macro.mall.model.SmsSeckillPromotionPlatformTime
;
import
com.macro.mall.service.promotion.SmsSeckillPromotionPlatformTimeService
;
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
(
"sec/kill/time"
)
public
class
SmsSeckillPromotionPlatformTimeController
{
@Resource
private
SmsSeckillPromotionPlatformTimeService
seckillPromotionPlatformTimeService
;
@ApiOperation
(
"添加时间段"
)
@PostMapping
public
CommonResult
create
(
@RequestBody
SmsSeckillPromotionPlatformTimeDto
seckillPromotionPlatformTimeDto
)
{
int
count
=
seckillPromotionPlatformTimeService
.
create
(
seckillPromotionPlatformTimeDto
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"编辑时间段"
)
@PutMapping
public
CommonResult
update
(
@RequestBody
SmsSeckillPromotionPlatformTimeDto
seckillPromotionPlatformTimeDto
)
{
int
count
=
seckillPromotionPlatformTimeService
.
update
(
seckillPromotionPlatformTimeDto
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"删除时间段"
)
@DeleteMapping
(
value
=
"{id}"
)
public
CommonResult
delete
(
@PathVariable
Long
id
)
{
int
count
=
seckillPromotionPlatformTimeService
.
delete
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"时间段列表"
)
@GetMapping
public
CommonResult
<
CommonPage
<
SmsSeckillPromotionPlatformTime
>>
getItemList
()
{
List
<
SmsSeckillPromotionPlatformTime
>
seckillPromotionList
=
seckillPromotionPlatformTimeService
.
list
();
return
CommonResult
.
success
(
CommonPage
.
restPage
(
seckillPromotionList
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/quanxing/PmsSupplierAuditController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
quanxing
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.PmsSupplierAuditDto
;
import
com.macro.mall.model.dto.quanxing.PmsSupplierAuditRequest
;
import
com.macro.mall.service.quanxing.IPmsSupplierAuditService
;
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.*
;
@Controller
@RequestMapping
(
"/pmsSupplierAudit"
)
@Api
(
tags
=
"权星后台_供应商相关接口"
,
description
=
"申请供应商控制器"
)
public
class
PmsSupplierAuditController
{
@Autowired
private
IPmsSupplierAuditService
pmsSupplierAuditService
;
@ApiOperation
(
"权星后台_审核申请供应商"
)
@ResponseBody
@RequestMapping
(
value
=
"/auditSupplier"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
auditSupplier
(
@RequestBody
PmsSupplierAuditRequest
pmsSupplierAuditRequest
){
ResultMsg
res
=
this
.
pmsSupplierAuditService
.
auditSupplier
(
pmsSupplierAuditRequest
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星后台_申请供应商分页数据"
)
@ResponseBody
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
getPageList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"page"
)
Integer
page
,
@ApiParam
(
"每页大小"
)
@RequestParam
(
"size"
)
Integer
size
,
@ApiParam
(
"供应商名称"
)
@RequestParam
(
"name"
)
String
name
,
@ApiParam
(
"手机号"
)
@RequestParam
(
"phone"
)
String
phone
,
@ApiParam
(
"(非必传)审核状态 0待审核 1审核通过 2审核不通过"
)
@RequestParam
(
"status"
)
Integer
status
){
return
CommonResult
.
success
(
this
.
pmsSupplierAuditService
.
getPageList
(
page
,
size
,
name
,
phone
,
status
));
}
@ApiOperation
(
"权星后台_通过审核Id得到 相关数据"
)
@ResponseBody
@RequestMapping
(
value
=
"/getSupplierAuditById"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
getSupplierAuditById
(
@ApiParam
(
"审核id"
)
@RequestParam
(
"id"
)
Long
id
){
return
CommonResult
.
success
(
this
.
pmsSupplierAuditService
.
getSupplierAuditById
(
id
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/returnparcel/OmsReturnParcelController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
returnparcel
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.component.DgbSecurityUserHelper
;
import
com.macro.mall.dto.OmsCceptParcelParam
;
import
com.macro.mall.dto.OmsReturnParcelParam
;
import
com.macro.mall.model.OmsReturnParcel
;
import
com.macro.mall.model.UmsAdmin
;
import
com.macro.mall.service.returnparcel.OmsReturnParcelService
;
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
(
"/returnParcel"
)
public
class
OmsReturnParcelController
{
@Resource
private
OmsReturnParcelService
omsReturnParcelService
;
@ApiOperation
(
"查询退货包裹"
)
@RequestMapping
(
value
=
"/getParcel"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
OmsReturnParcel
>>
getReturnParcelList
(
@ModelAttribute
OmsReturnParcelParam
omsReturnParcelParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
UmsAdmin
umsAdmin
=
DgbSecurityUserHelper
.
getCurrentUser
();
omsReturnParcelParam
.
setMchtId
(
umsAdmin
.
getId
());
List
<
OmsReturnParcel
>
returnParcelList
=
omsReturnParcelService
.
getReturnParcelList
(
omsReturnParcelParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
returnParcelList
));
}
@ApiOperation
(
"提交待签收包裹"
)
@RequestMapping
(
value
=
"/putParcel"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
putReturnParcel
(
@RequestBody
OmsReturnParcelParam
omsReturnParcelParam
){
UmsAdmin
umsAdmin
=
DgbSecurityUserHelper
.
getCurrentUser
();
omsReturnParcelParam
.
setMchtId
(
umsAdmin
.
getId
());
Integer
count
=
omsReturnParcelService
.
putReturnParcel
(
omsReturnParcelParam
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
"签收包裹"
)
@RequestMapping
(
value
=
"/cceptParcel"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
putCceptParcel
(
@RequestBody
OmsCceptParcelParam
omsCceptParcelParam
){
Integer
count
=
omsReturnParcelService
.
putCceptParcel
(
omsCceptParcelParam
);
if
(
count
==
3
)
{
return
CommonResult
.
success
(
3
);
}
else
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/review/OmsComplaintApplicationController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
review
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.OmsComplaintApplicationParam
;
import
com.macro.mall.dto.Vo.OmsComplaintApplicationReview
;
import
com.macro.mall.model.OmsComplaintApplication
;
import
com.macro.mall.service.OmsComplaintApplicationService
;
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
OmsComplaintApplicationService
complaintApplicationService
;
/**
* 投诉列表
*/
@ApiOperation
(
"投诉分页列表"
)
@RequestMapping
(
value
=
"/getList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
OmsComplaintApplication
>>
getList
(
OmsComplaintApplicationParam
complaintApplicationParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
OmsComplaintApplication
>
list
=
complaintApplicationService
.
getList
(
complaintApplicationParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
/**
* 投诉处理页数据
*/
@ApiOperation
(
"投诉处理页数据"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
OmsComplaintApplication
>
detail
(
Long
id
){
OmsComplaintApplication
complaintApplication
=
complaintApplicationService
.
detail
(
id
);
return
CommonResult
.
success
(
complaintApplication
);
}
/**
* 投诉审核
*/
@ApiOperation
(
"审核"
)
@RequestMapping
(
value
=
"/complaintReview"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
complaintReview
(
OmsComplaintApplicationReview
complaintApplicationReview
){
return
complaintApplicationService
.
complaintReview
(
complaintApplicationReview
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/review/PmsCommodityReportController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
review
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.PmsCommodityReportParam
;
import
com.macro.mall.dto.Vo.PmsCommodityReportVo
;
import
com.macro.mall.model.PmsCommodityReport
;
import
com.macro.mall.service.PmsCommodityReportService
;
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.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
;
/**
* @author yupengcheng
* @ClasssName PmsCommodityReportController
* @Description
* @Date 2020/3/30 13:36
*/
@Controller
@Api
(
tags
=
"商品举报处理"
,
description
=
"商品举报处理"
)
@RequestMapping
(
"/report"
)
public
class
PmsCommodityReportController
{
@Autowired
private
PmsCommodityReportService
pmsCommodityReportService
;
/**
* 举报分页展示
*/
@ApiOperation
(
"举报分页展示"
)
@RequestMapping
(
value
=
"/quperPageList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
PmsCommodityReportVo
>>
quperPageList
(
PmsCommodityReportParam
commodityReportParam
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsCommodityReportVo
>
list
=
pmsCommodityReportService
.
queryPageList
(
commodityReportParam
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
/**
* 举报详情
*/
@ApiOperation
(
"举报详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
PmsCommodityReport
>
detail
(
Long
id
){
PmsCommodityReport
detail
=
pmsCommodityReportService
.
detail
(
id
);
return
CommonResult
.
success
(
detail
);
}
/**
* 处理
*/
@ApiOperation
(
"处理"
)
@RequestMapping
(
value
=
"/process"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"举报id"
,
dataType
=
"Long"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"processingSituation"
,
value
=
"处理情况(0恶意 1误解 2下架)"
,
dataType
=
"Integer"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"processingContent"
,
value
=
"处理内容"
,
dataType
=
"String"
,
required
=
false
,
paramType
=
"query"
)
})
public
CommonResult
process
(
Long
id
,
Integer
processingSituation
,
String
processingContent
){
return
pmsCommodityReportService
.
process
(
id
,
processingSituation
,
processingContent
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/review/UmsWithdrawalReviewController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
review
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.UmsWithdrawalReviewParam
;
import
com.macro.mall.model.UmsWithdrawalReview
;
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
java.util.List
;
/**
* @author yupengcheng
* @ClasssName UmsWithdrawalReviewController
* @Description
* @Date 2020/2/26 18:28
*/
@Controller
@Api
(
tags
=
"提现申请审核"
,
description
=
"提现申请审核"
)
@RequestMapping
(
"/finance"
)
public
class
UmsWithdrawalReviewController
{
@Autowired
private
UmsWithdrawalReviewService
withdrawalReviewService
;
@ApiOperation
(
"提现审核分页列表"
)
@RequestMapping
(
value
=
"/reviewList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
CommonPage
<
UmsWithdrawalReview
>>
reviewList
(
UmsWithdrawalReviewParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
)
{
List
<
UmsWithdrawalReview
>
list
=
withdrawalReviewService
.
reviewList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
list
));
}
@ApiOperation
(
"审核详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
UmsWithdrawalReview
>
detail
(
@RequestParam
Long
id
){
UmsWithdrawalReview
withdrawalReview
=
withdrawalReviewService
.
detail
(
id
);
return
CommonResult
.
success
(
withdrawalReview
);
}
@ApiOperation
(
"审核"
)
@RequestMapping
(
value
=
"/review"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"申请id"
,
dataType
=
"Long"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"审核状态(0通过 1拒绝)"
,
dataType
=
"String"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"remark"
,
value
=
"审核备注"
,
dataType
=
"String"
,
required
=
false
,
paramType
=
"query"
)
})
public
CommonResult
review
(
Long
id
,
String
status
,
String
remark
){
int
count
=
withdrawalReviewService
.
review
(
id
,
status
,
remark
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"付款"
)
@RequestMapping
(
value
=
"/payment"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"申请id"
,
dataType
=
"Long"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"审核状态(0成功 1失败)"
,
dataType
=
"String"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"paymentMode"
,
value
=
"付款方式(0支付宝 1 微信)"
,
dataType
=
"String"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"paymentSerialNumber"
,
value
=
"付款交易流水号"
,
dataType
=
"String"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"paymentRemark"
,
value
=
"付款备注"
,
dataType
=
"String"
,
required
=
false
,
paramType
=
"query"
)
})
public
CommonResult
payment
(
Long
id
,
String
status
,
String
paymentMode
,
String
paymentSerialNumber
,
String
paymentRemark
){
int
count
=
withdrawalReviewService
.
payment
(
id
,
status
,
paymentMode
,
paymentSerialNumber
,
paymentRemark
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
"到款"
)
@RequestMapping
(
value
=
"/arrived"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"申请id"
,
dataType
=
"Long"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"status"
,
value
=
"审核状态(0成功 1失败)"
,
dataType
=
"String"
,
required
=
true
,
paramType
=
"query"
),
})
public
CommonResult
arrived
(
Long
id
,
String
status
){
int
count
=
withdrawalReviewService
.
arrived
(
id
,
status
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
}
mall-admin/src/main/java/com/macro/mall/controller/servicemcht/PmsApplyParamSetController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
servicemcht
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsApplyParamSet
;
import
com.macro.mall.service.servicemcht.PmsSmchtParamSetService
;
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 PmsApplyParamSetController
* @Description TODO
* @Author cxh
* @Date 2020/3/28 16:27
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"服务商入驻信息设置"
,
description
=
"服务商入驻信息设置"
)
@RequestMapping
(
value
=
"/paramset"
)
public
class
PmsApplyParamSetController
{
@Resource
private
PmsSmchtParamSetService
pmsSmchtParamSetService
;
@ApiOperation
(
value
=
"获取参数列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
PmsApplyParamSet
>>
getList
(){
List
<
PmsApplyParamSet
>
result
=
pmsSmchtParamSetService
.
getList
();
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"启用设置"
)
@RequestMapping
(
value
=
"/start"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
startSet
(
@ApiParam
(
"参数id"
)
@RequestParam
Long
id
){
Integer
count
=
pmsSmchtParamSetService
.
startSet
(
id
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"必填设置"
)
@RequestMapping
(
value
=
"/must"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
mustSet
(
@ApiParam
(
"参数id"
)
@RequestParam
Long
id
){
Integer
count
=
pmsSmchtParamSetService
.
mustSet
(
id
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/servicemcht/PmsServiceMchtCategoryController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
servicemcht
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsServiceMchtCategory
;
import
com.macro.mall.service.servicemcht.PmsServiceMchtCategoryService
;
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 PmsServiceMchtCategoryController
* @Description TODO
* @Author cxh
* @Date 2020/3/26 15:29
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"服务商类目"
,
description
=
"服务商类目"
)
@RequestMapping
(
value
=
"/serviceCategory"
)
public
class
PmsServiceMchtCategoryController
{
@Resource
private
PmsServiceMchtCategoryService
pmsServiceMchtCategoryService
;
@ApiOperation
(
value
=
"获取服务商类目列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsServiceMchtCategory
>>
getCategoryList
(
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsServiceMchtCategory
>
categories
=
pmsServiceMchtCategoryService
.
getCategoryList
(
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
categories
));
}
@ApiOperation
(
value
=
"添加服务商类目"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
addCategory
(
@RequestBody
PmsServiceMchtCategory
mchtCategory
){
Integer
count
=
pmsServiceMchtCategoryService
.
addCategory
(
mchtCategory
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"编辑服务商类目"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateCategory
(
@RequestBody
PmsServiceMchtCategory
mchtCategory
){
Integer
count
=
pmsServiceMchtCategoryService
.
updateCategory
(
mchtCategory
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"删除服务商类目"
)
@RequestMapping
(
value
=
"/del"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
delCategory
(
@RequestParam
Long
id
){
Integer
count
=
pmsServiceMchtCategoryService
.
delCategory
(
id
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"服务转移"
)
@RequestMapping
(
value
=
"/transfer"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
serviceTransfer
(
@ApiParam
(
"被转移类目id"
)
@RequestParam
Long
aCategoryId
,
@ApiParam
(
"转移类目id"
)
@RequestParam
Long
bCategoryId
){
Integer
count
=
pmsServiceMchtCategoryService
.
serviceTransfer
(
aCategoryId
,
bCategoryId
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/servicemcht/PmsServiceMchtController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
servicemcht
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.vo.PmsMchtAuditInfoResult
;
import
com.macro.mall.dto.servicemcht.*
;
import
com.macro.mall.dto.PmsServiceMchtApplyParam
;
import
com.macro.mall.model.PmsMchtAptitudeInfo
;
import
com.macro.mall.model.PmsMchtAuditList
;
import
com.macro.mall.model.PmsMchtShopInfo
;
import
com.macro.mall.service.servicemcht.PmsServiceMchtService
;
import
com.sun.xml.bind.v2.model.core.ID
;
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
;
@RestController
@Api
(
tags
=
"服务商"
,
description
=
"服务商"
)
@RequestMapping
(
value
=
"/servicemcht"
)
public
class
PmsServiceMchtController
{
@Resource
private
PmsServiceMchtService
pmsServiceMchtService
;
@ApiOperation
(
value
=
"服务商首页数据"
)
@RequestMapping
(
value
=
"/home"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsSmchtHomeDataResult
>
getHomeData
(){
PmsSmchtHomeDataResult
result
=
pmsServiceMchtService
.
getHomeData
();
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"入驻申请"
)
@RequestMapping
(
value
=
"/apply"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
serviceMchtApply
(
@RequestBody
PmsServiceMchtApplyParam
param
)
throws
Exception
{
Integer
count
=
pmsServiceMchtService
.
saveServiceMcht
(
param
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"/获取服务商审核列表"
)
@RequestMapping
(
value
=
"/auditlist"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsMchtAuditList
>>
getAuditList
(
@ModelAttribute
PmsAuditListParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsMchtAuditList
>
auditLists
=
pmsServiceMchtService
.
getAuditList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
auditLists
));
}
@ApiOperation
(
value
=
"获取服务商申请详情"
)
@RequestMapping
(
value
=
"/auditDetail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsAuditResult
>
getAuditDetail
(
@ApiParam
(
"申请id"
)
@RequestParam
Long
applyId
){
PmsAuditResult
result
=
pmsServiceMchtService
.
getAuditDetail
(
applyId
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"编辑服务商信息"
)
@RequestMapping
(
value
=
"updateAudit"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateAuditInfo
(
@RequestBody
PmsMchtAptitudeInfo
aptitudeInfo
){
Integer
count
=
pmsServiceMchtService
.
updateAuditInfo
(
aptitudeInfo
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"服务商入驻审核"
)
@RequestMapping
(
value
=
"/audit"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
auditApplly
(
@RequestBody
PmsAuditParam
param
)
throws
Exception
{
Integer
count
=
pmsServiceMchtService
.
auditApplly
(
param
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"服务商店铺申请列表"
)
@RequestMapping
(
value
=
"/shopInfoList"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsMchtShopInfo
>>
getShopInfoList
(
@ModelAttribute
PmsShopInfoParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsMchtShopInfo
>
shopInfoList
=
pmsServiceMchtService
.
getShopInfoList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
shopInfoList
));
}
@ApiOperation
(
value
=
"获取服务商店铺详情"
)
@RequestMapping
(
value
=
"/shopDetail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsServiceShopInfoResult
>
getShopInfoDetail
(
@ApiParam
(
"店铺id"
)
@RequestParam
Long
id
){
PmsServiceShopInfoResult
result
=
pmsServiceMchtService
.
getShopInfoDetail
(
id
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"服务商店铺审核"
)
@RequestMapping
(
value
=
"/auditShop"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
auditShop
(
@RequestBody
PmsAuditParam
param
)
throws
Exception
{
Integer
count
=
pmsServiceMchtService
.
auditShop
(
param
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"服务商店铺编辑"
)
@RequestMapping
(
value
=
"/updateShop"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateShop
(
@RequestBody
PmsMchtShopInfo
shopInfo
){
Integer
count
=
pmsServiceMchtService
.
updateShop
(
shopInfo
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"服务受理"
)
@RequestMapping
(
value
=
"/accept"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
accept
(
@RequestBody
PmsAuditParam
param
)
throws
Exception
{
Integer
count
=
pmsServiceMchtService
.
accept
(
param
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取当前登录服务商信息"
)
@RequestMapping
(
value
=
"/info"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsSmchtInfoResult
>
getSmchtInfo
(){
PmsSmchtInfoResult
result
=
pmsServiceMchtService
.
getSmchtInfo
();
return
CommonResult
.
success
(
result
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/servicemcht/PmsSmchtServiceController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
servicemcht
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.PmsSmchtServiceDownParam
;
import
com.macro.mall.dto.servicemcht.PmsSmchtServiceAuditParam
;
import
com.macro.mall.dto.servicemcht.PmsSmchtServiceDetailResult
;
import
com.macro.mall.dto.servicemcht.PmsSmchtServiceParam
;
import
com.macro.mall.dto.servicemcht.PmsSmchtServiceResult
;
import
com.macro.mall.model.PmsSmchtService
;
import
com.macro.mall.service.servicemcht.PmsSmchtServiceService
;
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 PmsSmchtServiceController
* @Description TODO
* @Author cxh
* @Date 2020/3/27 15:45
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"服务商服务"
,
description
=
"服务商服务"
)
@RequestMapping
(
value
=
"/smcht"
)
public
class
PmsSmchtServiceController
{
@Resource
private
PmsSmchtServiceService
pmsSmchtServiceService
;
@ApiOperation
(
value
=
"添加服务"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
addService
(
@RequestBody
PmsSmchtService
pmsSmchtService
)
throws
Exception
{
Integer
count
=
pmsSmchtServiceService
.
addService
(
pmsSmchtService
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取服务详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsSmchtServiceDetailResult
>
getDetail
(
@RequestParam
Long
id
){
PmsSmchtServiceDetailResult
result
=
pmsSmchtServiceService
.
getDetail
(
id
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"编辑服务"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateService
(
@RequestBody
PmsSmchtService
pmsSmchtService
){
Integer
count
=
pmsSmchtServiceService
.
updateService
(
pmsSmchtService
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"删除服务"
)
@RequestMapping
(
value
=
"/del"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
delService
(
@RequestBody
List
<
Long
>
ids
){
Integer
count
=
pmsSmchtServiceService
.
delService
(
ids
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"服务上架"
)
@RequestMapping
(
value
=
"/put"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
putService
(
@RequestParam
Long
id
){
Integer
count
=
pmsSmchtServiceService
.
putService
(
id
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取服务列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsSmchtServiceResult
>>
getServiceList
(
@ModelAttribute
PmsSmchtServiceParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsSmchtServiceResult
>
results
=
pmsSmchtServiceService
.
getServiceList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
results
));
}
@ApiOperation
(
value
=
"服务审核"
)
@RequestMapping
(
value
=
"/audit"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
auditService
(
PmsSmchtServiceAuditParam
param
)
throws
Exception
{
Integer
count
=
pmsSmchtServiceService
.
auditService
(
param
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"服务下架"
)
@RequestMapping
(
value
=
"/down"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
downService
(
@RequestBody
PmsSmchtServiceDownParam
param
){
Integer
count
=
pmsSmchtServiceService
.
downService
(
param
.
getIds
(),
param
.
getRole
());
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/setup/KdniaoSubscribeController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
setup
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.component.DgbSecurityUserHelper
;
import
com.macro.mall.dto.KdniaoSubscribeParam
;
import
com.macro.mall.model.SysDict
;
import
com.macro.mall.model.UmsAdmin
;
import
com.macro.mall.service.system.SysDictService
;
import
com.macro.mall.service.system.UmsAdminService
;
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.util.StringUtils
;
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
;
/**
* @author yupengcheng
* @ClasssName KdniaoSubscribeController
* @Description
* @Date 2020/4/1 17:37
*/
@Controller
@Api
(
tags
=
"快递鸟配置"
,
description
=
"快递鸟配置"
)
@RequestMapping
(
"/kdniao"
)
public
class
KdniaoSubscribeController
{
@Autowired
private
UmsAdminService
umsAdminService
;
/**
* 获取快递鸟配置
*/
@ApiOperation
(
"获取快递鸟配置"
)
@RequestMapping
(
value
=
"/select"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
KdniaoSubscribeParam
>
select
(){
//获取当前登录用户
UmsAdmin
admin
=
DgbSecurityUserHelper
.
getCurrentUser
();
String
kdnUid
=
admin
.
getKdnUid
();
String
kdnAppkey
=
admin
.
getKdnAppkey
();
KdniaoSubscribeParam
kdniaoSubscribeParam
=
new
KdniaoSubscribeParam
();
kdniaoSubscribeParam
.
setUsinessID
(
kdnUid
);
kdniaoSubscribeParam
.
setAppKey
(
kdnAppkey
);
return
CommonResult
.
success
(
kdniaoSubscribeParam
);
}
/**
* 修改配置
*/
@ApiOperation
(
"修改配置"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@RequestBody
KdniaoSubscribeParam
kdniaoSubscribeParam
){
//获取当前登录用户
UmsAdmin
admin
=
DgbSecurityUserHelper
.
getCurrentUser
();
//获取修改后的配置
String
uid
=
kdniaoSubscribeParam
.
getUsinessID
();
String
appKey
=
kdniaoSubscribeParam
.
getAppKey
();
//设置修改配置
if
(!
StringUtils
.
isEmpty
(
uid
)){
admin
.
setKdnUid
(
uid
);
}
if
(!
StringUtils
.
isEmpty
(
appKey
)){
admin
.
setKdnAppkey
(
appKey
);
}
int
update
=
umsAdminService
.
update
(
admin
);
if
(
update
>
0
){
return
CommonResult
.
success
(
"修改成功"
);
}
else
{
return
CommonResult
.
failed
(
"修改失败"
);
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/setup/OmsComplaintDeadlineController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
setup
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.OmsComplaintDeadline
;
import
com.macro.mall.service.OmsComplaintDeadlineService
;
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
;
/**
* @author yupengcheng
* @ClasssName OmsComplaintDeadlineController
* @Description
* @Date 2020/3/2 9:31
*/
@Controller
@Api
(
tags
=
"交易投诉期限设置"
,
description
=
"交易投诉期限设置"
)
@RequestMapping
(
"/complaint/deadline"
)
public
class
OmsComplaintDeadlineController
{
@Autowired
private
OmsComplaintDeadlineService
complaintDeadlineService
;
@ApiOperation
(
value
=
"获取交易投诉期限"
)
@RequestMapping
(
value
=
"/getOne"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
OmsComplaintDeadline
>
getOne
(){
OmsComplaintDeadline
complaintDeadline
=
complaintDeadlineService
.
getOne
();
return
CommonResult
.
success
(
complaintDeadline
);
}
@ApiOperation
(
value
=
"修改交易投诉期限"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@RequestBody
OmsComplaintDeadline
complaintDeadline
){
int
count
=
complaintDeadlineService
.
update
(
complaintDeadline
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
}
mall-admin/src/main/java/com/macro/mall/controller/setup/OmsComplaintTypeController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
setup
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.OmsComplaintType
;
import
com.macro.mall.service.OmsComplaintTypeService
;
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.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
java.util.List
;
/**
* @author yupengcheng
* @ClasssName OmsComplaintTypeController
* @Description
* @Date 2020/3/2 9:48
*/
@Controller
@Api
(
tags
=
"交易投诉类型设置"
,
description
=
"交易投诉类型设置"
)
@RequestMapping
(
"/complaint/type"
)
public
class
OmsComplaintTypeController
{
@Autowired
private
OmsComplaintTypeService
complaintTypeService
;
@ApiOperation
(
value
=
"获取投诉类型列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
OmsComplaintType
>>
list
(){
List
<
OmsComplaintType
>
list
=
complaintTypeService
.
list
();
return
CommonResult
.
success
(
list
);
}
@ApiOperation
(
value
=
"修改投诉类型是否显示"
)
@RequestMapping
(
value
=
"/updateByType"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"id"
,
value
=
"id"
,
dataType
=
"Long"
,
required
=
true
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"display"
,
value
=
"是否显示(0是 1否)"
,
dataType
=
"String"
,
required
=
true
,
paramType
=
"query"
),
})
public
CommonResult
updateByType
(
Long
id
,
String
display
){
return
complaintTypeService
.
updateByType
(
id
,
display
);
}
@ApiOperation
(
value
=
"获取详情"
)
@RequestMapping
(
value
=
"/genDetail"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
OmsComplaintType
>
genDetail
(
Long
id
){
OmsComplaintType
omsComplaintType
=
complaintTypeService
.
genDetail
(
id
);
return
CommonResult
.
success
(
omsComplaintType
);
}
@ApiOperation
(
value
=
"修改"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@RequestBody
OmsComplaintType
complaintType
){
int
count
=
complaintTypeService
.
update
(
complaintType
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
value
=
"删除"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
delete
(
Long
id
){
int
count
=
complaintTypeService
.
delete
(
id
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
@ApiOperation
(
value
=
"添加"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
add
(
@RequestBody
OmsComplaintType
complaintType
){
int
count
=
complaintTypeService
.
add
(
complaintType
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
(
"添加失败"
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/setup/SysMallSetupController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
setup
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.SysMallSetupDict
;
import
com.macro.mall.model.SysDict
;
import
com.macro.mall.service.SysMallSetupService
;
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 SysMallSetupController
* @Description
* @Date 2020/3/5 9:29
*/
@Controller
@Api
(
tags
=
"商城设置"
,
description
=
"商城设置"
)
@RequestMapping
(
"/sys/mall"
)
public
class
SysMallSetupController
{
@Autowired
private
SysMallSetupService
mallSetupService
;
/**
* 商城设置列表
*/
@ApiOperation
(
"商城设置列表"
)
@RequestMapping
(
value
=
"/settingsList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ApiImplicitParams
({
@ApiImplicitParam
(
value
=
"(0平台信息 1基本设置 2显示设置 3购物流程 4扩展设置 5Logo设置 6提现设置 7支付方式)"
,
name
=
"status"
,
dataType
=
"Integer"
,
required
=
true
,
paramType
=
"query"
)
})
public
CommonResult
<
List
<
SysDict
>>
settingsList
(
Integer
status
)
{
String
like
=
""
;
if
(
status
.
equals
(
0
))
{
like
=
"P_"
;
}
if
(
status
.
equals
(
1
))
{
like
=
"J_"
;
}
if
(
status
.
equals
(
2
))
{
like
=
"X_"
;
}
if
(
status
.
equals
(
3
))
{
like
=
"G_"
;
}
if
(
status
.
equals
(
4
))
{
like
=
"K_"
;
}
if
(
status
.
equals
(
5
))
{
like
=
"L_"
;
}
if
(
status
.
equals
(
6
))
{
like
=
"CW_"
;
}
if
(
status
.
equals
(
7
))
{
like
=
"pay_"
;
}
List
<
SysDict
>
list
=
mallSetupService
.
getList
(
like
);
return
CommonResult
.
success
(
list
);
}
/**
* 修改商城设置
*/
@ApiOperation
(
"修改商城设置"
)
@RequestMapping
(
value
=
"/updateList"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateList
(
@RequestBody
List
<
SysDict
>
list
)
throws
Exception
{
return
mallSetupService
.
updateList
(
list
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/setup/UmsReportPunishmentController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
setup
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.UmsReportPunishment
;
import
com.macro.mall.service.UmsReportPunishmentService
;
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
;
/**
* @author yupengcheng
* @ClasssName UmsReportPunishmentController
* @Description
* @Date 2020/3/30 16:30
*/
@Controller
@Api
(
tags
=
"恶意举报处罚设置"
,
description
=
"恶意举报处罚设置"
)
@RequestMapping
(
"/report/punishment"
)
public
class
UmsReportPunishmentController
{
@Autowired
private
UmsReportPunishmentService
umsReportPunishmentService
;
/**
* 获取处罚设置
*/
@ApiOperation
(
"获取处罚设置"
)
@RequestMapping
(
value
=
"/getOne"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
UmsReportPunishment
>
getOne
(){
UmsReportPunishment
reportPunishment
=
umsReportPunishmentService
.
getOne
();
return
CommonResult
.
success
(
reportPunishment
);
}
/**
* 修改处罚设置
*/
@ApiOperation
(
"修改处罚设置"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@RequestBody
UmsReportPunishment
umsReportPunishment
){
return
umsReportPunishmentService
.
update
(
umsReportPunishment
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/setup/UmsReportThemeController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
setup
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.dto.UmsReportThemeList
;
import
com.macro.mall.model.UmsReportTheme
;
import
com.macro.mall.service.UmsReportThemeService
;
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
;
import
java.util.List
;
/**
* @author yupengcheng
* @ClasssName UmsReportThemeController
* @Description
* @Date 2020/3/30 11:45
*/
@Controller
@Api
(
tags
=
"举报主题设置"
,
description
=
"举报主题设置"
)
@RequestMapping
(
"/report/theme"
)
public
class
UmsReportThemeController
{
@Autowired
private
UmsReportThemeService
umsReportThemeService
;
/**
* 查询所有举报主题
*/
@ApiOperation
(
"查询所有举报主题"
)
@RequestMapping
(
value
=
"/getList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
UmsReportThemeList
>>
getList
(){
List
<
UmsReportThemeList
>
list
=
umsReportThemeService
.
getList
();
return
CommonResult
.
success
(
list
);
}
/**
* 添加举报主题
*/
@ApiOperation
(
"添加举报主题"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
add
(
@RequestBody
UmsReportTheme
reportTheme
){
return
umsReportThemeService
.
add
(
reportTheme
);
}
/**
* 修改举报主题
*/
@ApiOperation
(
"修改举报主题"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@RequestBody
UmsReportTheme
reportTheme
){
return
umsReportThemeService
.
update
(
reportTheme
);
}
/**
* 举报主题详情
*/
@ApiOperation
(
"举报主题详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
UmsReportTheme
>
detail
(
Long
id
){
UmsReportTheme
detail
=
umsReportThemeService
.
detail
(
id
);
return
CommonResult
.
success
(
detail
);
}
/**
* 删除举报主题
*/
@ApiOperation
(
"删除举报主题"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
delete
(
Long
id
){
return
umsReportThemeService
.
delect
(
id
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/setup/UmsReportTypeController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
setup
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.UmsReportType
;
import
com.macro.mall.service.UmsReportTypeService
;
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
;
import
java.util.List
;
/**
* @author yupengcheng
* @ClasssName UmsReportTypeController
* @Description
* @Date 2020/3/30 11:44
*/
@Controller
@Api
(
tags
=
"举报类型设置"
,
description
=
"举报类型设置"
)
@RequestMapping
(
"/report/type"
)
public
class
UmsReportTypeController
{
@Autowired
private
UmsReportTypeService
umsReportTypeService
;
/**
* 查询所有举报类型
*/
@ApiOperation
(
"查询所有举报类型"
)
@RequestMapping
(
value
=
"/getList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
UmsReportType
>>
getList
(){
List
<
UmsReportType
>
list
=
umsReportTypeService
.
getList
();
return
CommonResult
.
success
(
list
);
}
/**
* 添加举报类型
*/
@ApiOperation
(
"添加举报类型"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
add
(
@RequestBody
UmsReportType
reportTheme
){
return
umsReportTypeService
.
add
(
reportTheme
);
}
/**
* 修改举报类型
*/
@ApiOperation
(
"修改举报类型"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@RequestBody
UmsReportType
reportTheme
){
return
umsReportTypeService
.
update
(
reportTheme
);
}
/**
* 举报类型详情
*/
@ApiOperation
(
"举报类型详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
UmsReportType
>
detail
(
Long
id
){
UmsReportType
detail
=
umsReportTypeService
.
detail
(
id
);
return
CommonResult
.
success
(
detail
);
}
/**
* 删除举报类型
*/
@ApiOperation
(
"删除举报类型"
)
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
delete
(
Long
id
){
return
umsReportTypeService
.
delect
(
id
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/setup/UmsWithdrawalAmountController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
setup
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.core.annotion.BussinessLog
;
import
com.macro.mall.model.UmsWithdrawalAmount
;
import
com.macro.mall.service.UmsWithdrawalAmountService
;
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.*
;
/**
* @author yupengcheng
* @ClasssName UmsWithdrawalAmountController
* @Description
* @Date 2020/2/26 15:06
*/
@Controller
@Api
(
tags
=
"提现金额设置"
,
description
=
"提现金额设置"
)
@RequestMapping
(
"/withdrawal/amount"
)
public
class
UmsWithdrawalAmountController
{
@Autowired
private
UmsWithdrawalAmountService
withdrawalAmountService
;
@ApiOperation
(
"获取设置提现金额表"
)
@BussinessLog
(
value
=
"查询"
,
module
=
"提现金额设置"
)
@RequestMapping
(
value
=
"/select"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
UmsWithdrawalAmount
>
select
(){
UmsWithdrawalAmount
one
=
withdrawalAmountService
.
getOne
();
return
CommonResult
.
success
(
one
);
}
@ApiOperation
(
"修改提现金额表"
)
@BussinessLog
(
value
=
"修改"
,
module
=
"提现金额设置"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
update
(
@RequestBody
UmsWithdrawalAmount
withdrawalAmount
){
int
count
=
withdrawalAmountService
.
update
(
withdrawalAmount
);
if
(
count
>
0
)
{
return
CommonResult
.
success
(
count
);
}
return
CommonResult
.
failed
();
}
}
mall-admin/src/main/java/com/macro/mall/controller/shopdecorate/PmsshopDecorateController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
shopdecorate
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.*
;
import
com.macro.mall.service.shopdecorate.*
;
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
(
"/shopDecorate"
)
public
class
PmsshopDecorateController
{
@Resource
private
PmsShopIntroduceService
pmsShopIntroduceService
;
@Resource
private
PmsShopHomeContentService
pmsShopHomeContentService
;
@Resource
private
PmsShopCustomColumnService
pmsShopCustomColumnService
;
@Resource
private
PmsShopBackgroundservice
pmsShopBackgroundservice
;
@Resource
private
PmsShopSeoService
pmsShopSeoService
;
@Resource
private
PmsShopSignageService
pmsShopSignageService
;
@ApiOperation
(
value
=
"保存店铺介绍"
)
@RequestMapping
(
value
=
"/introduce"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
saveIntroduce
(
@RequestBody
PmsShopIntroduce
pmsShopIntroduce
){
Integer
count
=
pmsShopIntroduceService
.
saveIntroduce
(
pmsShopIntroduce
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"查询店铺介绍"
)
@RequestMapping
(
value
=
"/selIntroduce"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
PmsShopIntroduce
>>
selIntroduce
(
@RequestParam
Long
mchtId
){
List
<
PmsShopIntroduce
>
pmsShopIntroduce
=
pmsShopIntroduceService
.
selShopIntroduce
(
mchtId
);
return
CommonResult
.
success
(
pmsShopIntroduce
);
}
@ApiOperation
(
value
=
"修改店铺介绍"
)
@RequestMapping
(
value
=
"/updateIntroduce"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateIntroduce
(
@RequestBody
PmsShopIntroduce
pmsShopIntroduce
){
Integer
count
=
pmsShopIntroduceService
.
updateShopIntyroduce
(
pmsShopIntroduce
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"保存首页内容"
)
@RequestMapping
(
value
=
"/homeContent"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
saveHomeContent
(
@RequestBody
PmsShopHomeContent
pmsShopHomeContent
){
Integer
count
=
pmsShopHomeContentService
.
saveHomeContent
(
pmsShopHomeContent
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"查询首页内容"
)
@RequestMapping
(
value
=
"/selHomeContent"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
selHomeContent
(
@RequestParam
Long
mchtId
){
PmsShopHomeContent
pmsShopHomeContent
=
pmsShopHomeContentService
.
selHomeContent
(
mchtId
);
return
CommonResult
.
success
(
pmsShopHomeContent
);
}
@ApiOperation
(
value
=
"修改首页内容"
)
@RequestMapping
(
value
=
"/updateHomeContent"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateHomeContent
(
@RequestBody
PmsShopHomeContent
pmsShopHomeContent
){
Integer
count
=
pmsShopHomeContentService
.
updateHomeContent
(
pmsShopHomeContent
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"添加店铺自定义栏目"
)
@RequestMapping
(
value
=
"/customColumn"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
saveCustomColumn
(
@RequestBody
PmsShopCustomColumn
pmsShopCustomColumn
){
Integer
count
=
pmsShopCustomColumnService
.
saveCustomColumn
(
pmsShopCustomColumn
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"查询店铺自定义栏目"
)
@RequestMapping
(
value
=
"/selCustomColumn"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
selCustomColumn
(
@RequestParam
Long
mchtId
){
PmsShopCustomColumn
pmsShopCustomColumn
=
pmsShopCustomColumnService
.
selCustomColumn
(
mchtId
);
return
CommonResult
.
success
(
pmsShopCustomColumn
);
}
@ApiOperation
(
value
=
"修改店铺自定义栏目"
)
@RequestMapping
(
value
=
"/updateCustomColumn"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateCustomColumn
(
@RequestBody
PmsShopCustomColumn
pmsShopCustomColumn
){
Integer
count
=
pmsShopCustomColumnService
.
updateCustomColumn
(
pmsShopCustomColumn
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"设置店铺背景"
)
@RequestMapping
(
value
=
"/background"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
saveBackground
(
@RequestBody
PmsShopBackground
pmsShopBackground
){
Integer
count
=
pmsShopBackgroundservice
.
saveBackground
(
pmsShopBackground
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"查询店铺背景"
)
@RequestMapping
(
value
=
"/selBackground"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
selBackground
(
@RequestParam
Long
mchtId
){
PmsShopBackground
pmsShopBackground
=
pmsShopBackgroundservice
.
selBackground
(
mchtId
);
return
CommonResult
.
success
(
pmsShopBackground
);
}
@ApiOperation
(
value
=
"修改店铺背景"
)
@RequestMapping
(
value
=
"/updateBackground"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateBackground
(
@RequestBody
PmsShopBackground
pmsShopBackground
){
Integer
count
=
pmsShopBackgroundservice
.
updateBackground
(
pmsShopBackground
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"设置店铺seo"
)
@RequestMapping
(
value
=
"/shopSeo"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
saveShopSeo
(
@RequestBody
PmsShopSeo
pmsShopSeo
){
Integer
count
=
pmsShopSeoService
.
saveShopSeo
(
pmsShopSeo
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"查询店铺seo"
)
@RequestMapping
(
value
=
"/selShopSeo"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
selShopSeo
(
@RequestParam
Long
mchtId
){
PmsShopSeo
pmsShopSeo
=
pmsShopSeoService
.
selShopSeo
(
mchtId
);
return
CommonResult
.
success
(
pmsShopSeo
);
}
@ApiOperation
(
value
=
"修改店铺seo"
)
@RequestMapping
(
value
=
"/updateShopSeo"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateShopSeo
(
@RequestBody
PmsShopSeo
pmsShopSeo
){
Integer
count
=
pmsShopSeoService
.
updateShopSeo
(
pmsShopSeo
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"设置店招"
)
@RequestMapping
(
value
=
"/shopSignage"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
saveShopSignage
(
@RequestBody
PmsShopSignage
pmsShopSignage
){
Integer
count
=
pmsShopSignageService
.
saveShopSignage
(
pmsShopSignage
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"查询店招"
)
@RequestMapping
(
value
=
"/selShopSignage"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
selShopSignage
(
@RequestParam
Long
mchtId
){
PmsShopSignage
pmsShopSignage
=
pmsShopSignageService
.
selShopSignage
(
mchtId
);
return
CommonResult
.
success
(
pmsShopSignage
);
}
@ApiOperation
(
value
=
"修改店招"
)
@RequestMapping
(
value
=
"/updateShopSignage"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateShopSignage
(
@RequestBody
PmsShopSignage
pmsShopSignage
){
Integer
count
=
pmsShopSignageService
.
updateShopSignage
(
pmsShopSignage
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/shoplevel/PmsShopLevelController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
shoplevel
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsShopLevelParam
;
import
com.macro.mall.service.shoplevel.PmsShopLevelService
;
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 PmsShopLevelController
* @Description TODO
* @Author cxh
* @Date 2020/3/30 11:49
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"店铺等级信息"
,
description
=
"店铺等级信息"
)
@RequestMapping
(
value
=
"/shop/level"
)
public
class
PmsShopLevelController
{
@Resource
private
PmsShopLevelService
pmsShopLevelService
;
@ApiOperation
(
value
=
"添加店铺等级信息"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
addLecelParam
(
@RequestBody
PmsShopLevelParam
param
){
Integer
count
=
pmsShopLevelService
.
addLecelParam
(
param
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取店铺等级信息列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
PmsShopLevelParam
>>
getShopParamList
(){
List
<
PmsShopLevelParam
>
result
=
pmsShopLevelService
.
getShopParamList
();
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"更新店铺信息"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
updateShopParam
(
@RequestBody
PmsShopLevelParam
param
){
Integer
count
=
pmsShopLevelService
.
updateShopParam
(
param
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"删除店铺等级"
)
@RequestMapping
(
value
=
"/del"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
delShopParam
(
@ApiParam
(
"店铺等级id"
)
@RequestParam
Long
id
){
Integer
count
=
pmsShopLevelService
.
delShopParam
(
id
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取店铺等级详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
PmsShopLevelParam
>
getDetail
(
@ApiParam
(
"店铺等级id"
)
@RequestParam
Long
id
){
PmsShopLevelParam
param
=
pmsShopLevelService
.
getDetail
(
id
);
return
CommonResult
.
success
(
param
);
}
@ApiOperation
(
value
=
"设置启用"
)
@RequestMapping
(
value
=
"/start"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
setStart
(
@ApiParam
(
"店铺等级id"
)
@RequestParam
Long
id
){
Integer
count
=
pmsShopLevelService
.
setStart
(
id
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"设置默认"
)
@RequestMapping
(
value
=
"/default"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
setDefault
(
@ApiParam
(
"店铺等级id"
)
@RequestParam
Long
id
){
Integer
count
=
pmsShopLevelService
.
setDefault
(
id
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/spellgoods/MchtSpellGoodsController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
spellgoods
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.vo.spellgoods.MchtSpellGoodsVo
;
import
com.macro.mall.domain.vo.spellgoods.MchtSpellListVo
;
import
com.macro.mall.dto.MchtSpellGoodsParam
;
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
;
import
java.util.List
;
/**
* @ClassName MchtSpellGoodsController
* @Description TODO
* @Author cxh
* @Date 2020/4/28 17:00
* @Version 1.0
*/
@RestController
@Api
(
value
=
"拼货商家管理"
,
description
=
"拼货商家管理"
)
@RequestMapping
(
value
=
"/spell/mcht"
)
public
class
MchtSpellGoodsController
{
@Resource
private
MchtSpellGoodsService
mchtSpellGoodsService
;
@ApiOperation
(
value
=
"拼货商家列表"
)
@RequestMapping
(
value
=
"/apply/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
MchtSpellGoodsVo
>>
mchtSpellApplyList
(
Integer
status
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
MchtSpellGoodsVo
>
result
=
mchtSpellGoodsService
.
mchtSpellApplyList
(
status
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
@ApiOperation
(
value
=
"拼货商家审核"
)
@RequestMapping
(
value
=
"/audit"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
mchtSpellAudit
(
@RequestBody
MchtSpellGoodsParam
param
){
Integer
count
=
mchtSpellGoodsService
.
mchtSpellAudit
(
param
.
getApplyId
(),
param
.
getStatus
(),
param
.
getNote
());
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"拼货商家列表"
)
@RequestMapping
(
value
=
"/mcht/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
MchtSpellListVo
>>
mchsSpellList
(
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
MchtSpellListVo
>
result
=
mchtSpellGoodsService
.
mchsSpellList
(
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/spellgoods/SpellGoodsController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
spellgoods
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.spellgoods.AddSpellGoodsParam
;
import
com.macro.mall.domain.dto.spellgoods.SpellGoodsAuditParam
;
import
com.macro.mall.domain.dto.spellgoods.SpellGoodsParam
;
import
com.macro.mall.domain.vo.spellgoods.SpellGoodsAuditVo
;
import
com.macro.mall.domain.vo.spellgoods.SpellGoodsDetailVo
;
import
com.macro.mall.domain.vo.spellgoods.SpellGoodsVo
;
import
com.macro.mall.dto.AuditSpellGoodsParam
;
import
com.macro.mall.service.spellgoods.SpellGoodsService
;
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 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
();
}
}
@ApiOperation
(
value
=
"获取供应商拼货列表"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
SpellGoodsVo
>>
getSpellGoodsList
(
@ModelAttribute
SpellGoodsParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
SpellGoodsVo
>
result
=
spellGoodsService
.
getSpellGoodsList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
@ApiOperation
(
value
=
"获取拼货商品详情"
)
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
SpellGoodsDetailVo
>
getSpellGoodsDetail
(
@RequestParam
Long
itemId
){
SpellGoodsDetailVo
result
=
spellGoodsService
.
getSpellGoodsDetail
(
itemId
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"删除拼货商品"
)
@RequestMapping
(
value
=
"/del"
,
method
=
RequestMethod
.
DELETE
)
public
CommonResult
delSpellGoodsItem
(
@RequestParam
Long
itemId
){
Integer
count
=
spellGoodsService
.
delSpellGoodsItem
(
itemId
);
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
@ApiOperation
(
value
=
"获取拼货商品审核列表"
)
@RequestMapping
(
value
=
"/audit/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
SpellGoodsAuditVo
>>
getSpellGoodsAuditList
(
@ModelAttribute
SpellGoodsAuditParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
SpellGoodsAuditVo
>
result
=
spellGoodsService
.
getSpellGoodsAuditList
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
@ApiOperation
(
value
=
"拼货商品审核"
)
@RequestMapping
(
value
=
"/audit"
,
method
=
RequestMethod
.
PUT
)
public
CommonResult
spellGoodsAudit
(
@RequestBody
AuditSpellGoodsParam
param
)
throws
Exception
{
Integer
count
=
spellGoodsService
.
spellGoodsAudit
(
param
.
getItemId
(),
param
.
getStatus
(),
param
.
getNote
());
if
(
count
>
0
){
return
CommonResult
.
success
(
count
);
}
else
{
return
CommonResult
.
failed
();
}
}
}
mall-admin/src/main/java/com/macro/mall/controller/statistical/MchtStatisticalController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
statistical
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.statistical.MchtOrderStatisticalParam
;
import
com.macro.mall.domain.vo.statistical.MchtOrderStatisticalVo
;
import
com.macro.mall.domain.vo.statistical.MchtSalesStatisticalVo
;
import
com.macro.mall.model.OmsOrderSon
;
import
com.macro.mall.model.PmsMchtSalesStatistical
;
import
com.macro.mall.service.statistical.MchtStatisticalService
;
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 MchtStatisticalController
* @Description TODO
* @Author cxh
* @Date 2020/4/20 15:56
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"供应商报表管理"
,
description
=
"供应商报表管理"
)
@RequestMapping
(
value
=
"/mcht/statistical"
)
public
class
MchtStatisticalController
{
@Resource
private
MchtStatisticalService
mchtStatisticalService
;
@ApiOperation
(
value
=
"订单统计"
)
@RequestMapping
(
value
=
"/order"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
MchtOrderStatisticalVo
>
orderStatistical
(
@ModelAttribute
MchtOrderStatisticalParam
param
){
MchtOrderStatisticalVo
result
=
mchtStatisticalService
.
orderStatistical
(
param
.
getType
(),
param
.
getBegin
(),
param
.
getEnd
(),
param
.
getMchtId
());
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"订单统计-订单列表"
)
@RequestMapping
(
value
=
"/order/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
OmsOrderSon
>>
orderStatisticalList
(
@ModelAttribute
MchtOrderStatisticalParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
OmsOrderSon
>
result
=
mchtStatisticalService
.
orderStatisticalList
(
param
.
getBegin
(),
param
.
getEnd
(),
param
.
getMchtId
(),
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
@ApiOperation
(
value
=
"销售统计"
)
@RequestMapping
(
value
=
"/sales"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
MchtSalesStatisticalVo
>
salesStatistical
(
@ModelAttribute
MchtOrderStatisticalParam
param
){
MchtSalesStatisticalVo
result
=
mchtStatisticalService
.
salesStatistical
(
param
.
getMchtId
(),
param
.
getBegin
(),
param
.
getEnd
());
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"销售统计-列表"
)
@RequestMapping
(
value
=
"/sales/list"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsMchtSalesStatistical
>>
mchtSalesStatistical
(
@ModelAttribute
MchtOrderStatisticalParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsMchtSalesStatistical
>
result
=
mchtStatisticalService
.
mchtSalesStatistical
(
param
.
getMchtId
(),
param
.
getBegin
(),
param
.
getEnd
(),
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/statistical/MemberStatisticalController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
statistical
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.statistical.MemberStatisticalParam
;
import
com.macro.mall.domain.vo.statistical.MemberShoppingAnalysisVo
;
import
com.macro.mall.domain.vo.statistical.MemberShoppingStatisticalVo
;
import
com.macro.mall.domain.vo.statistical.MemberStatisticalVo
;
import
com.macro.mall.service.statistical.MemberStatisticalService
;
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 MemberStatisticalController
* @Description TODO
* @Author cxh
* @Date 2020/4/17 17:23
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"会员统计"
,
description
=
"会员统计"
)
@RequestMapping
(
value
=
"/member/statistical"
)
public
class
MemberStatisticalController
{
@Resource
private
MemberStatisticalService
memberStatisticalService
;
@ApiOperation
(
value
=
"新增会员统计"
)
@RequestMapping
(
value
=
"/add"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
MemberStatisticalVo
>>
addMemberStatistical
(
@ModelAttribute
MemberStatisticalParam
param
){
List
<
MemberStatisticalVo
>
result
=
memberStatisticalService
.
addMemberStatistical
(
param
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"会员购买排行"
)
@RequestMapping
(
value
=
"/rank"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
MemberStatisticalVo
>>
memberSalesRank
(
@ModelAttribute
MemberStatisticalParam
param
){
List
<
MemberStatisticalVo
>
result
=
memberStatisticalService
.
memberSalesRank
(
param
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"会员购买统计"
)
@RequestMapping
(
value
=
"/shopping/statistical"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
MemberShoppingStatisticalVo
>>
shoppingStatistical
(
@ModelAttribute
MemberStatisticalParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
MemberShoppingStatisticalVo
>
result
=
memberStatisticalService
.
shoppingStatistical
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
@ApiOperation
(
value
=
"会员购买分析"
)
@RequestMapping
(
value
=
"/shopping/analysis"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
MemberShoppingAnalysisVo
>
memberShoppingAnalysis
(){
MemberShoppingAnalysisVo
result
=
memberStatisticalService
.
memberShoppingAnalysis
();
return
CommonResult
.
success
(
result
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/statistical/OrderStatisticalController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
statistical
;
/*
*
*/
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.statistical.OrderStatisticalParam
;
import
com.macro.mall.domain.vo.statistical.OrderStatisticalVo
;
import
com.macro.mall.service.statistical.OrderStatisticalService
;
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 OrderStatisticalController
* @Description TODO
* @Author cxh
* @Date 2020/4/20 14:36
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"订单统计分析"
,
description
=
"订单统计分析"
)
@RequestMapping
(
value
=
"/order/statistical"
)
public
class
OrderStatisticalController
{
@Resource
private
OrderStatisticalService
orderStatisticalService
;
@ApiOperation
(
value
=
"销售量统计"
)
@RequestMapping
(
value
=
"/sales"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
OrderStatisticalVo
>>
salesStatistical
(
@ModelAttribute
OrderStatisticalParam
param
){
List
<
OrderStatisticalVo
>
result
=
orderStatisticalService
.
salesStatistical
(
param
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"销售额统计"
)
@RequestMapping
(
value
=
"/amount"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
OrderStatisticalVo
>>
salesAmountStatistical
(
@ModelAttribute
OrderStatisticalParam
param
){
List
<
OrderStatisticalVo
>
result
=
orderStatisticalService
.
salesAmountStatistical
(
param
);
return
CommonResult
.
success
(
result
);
}
}
mall-admin/src/main/java/com/macro/mall/controller/statistical/ProductStatisticalController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
statistical
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.statistical.PmsProductStatisticaParam
;
import
com.macro.mall.domain.dto.statistical.ProductAnalysisParam
;
import
com.macro.mall.domain.vo.statistical.CategoryStatisticalVo
;
import
com.macro.mall.domain.vo.statistical.PmsProductStatisticalVo
;
import
com.macro.mall.domain.vo.statistical.ProductAnalysisVo
;
import
com.macro.mall.domain.vo.statistical.ProductStatisticalVo
;
import
com.macro.mall.service.statistical.ProductStatisticalService
;
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
;
/**
* @ClassName ProductStatisticalController
* @Description TODO
* @Author cxh
* @Date 2020/4/16 16:11
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"商品统计"
,
description
=
"商品统计"
)
@RequestMapping
(
value
=
"/product/statistical"
)
public
class
ProductStatisticalController
{
@Resource
private
ProductStatisticalService
productStatisticalService
;
@ApiOperation
(
value
=
"主营类目商品统计"
)
@RequestMapping
(
value
=
"/product"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"type"
,
value
=
"类型(1一级类目2二级类目3三级类目)"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"query"
)
})
public
CommonResult
<
List
<
ProductStatisticalVo
>>
productStatistical
(
@RequestParam
Integer
type
,
Long
categoryId
){
List
<
ProductStatisticalVo
>
result
=
productStatisticalService
.
productStatistical
(
type
,
categoryId
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"主营类目分析"
)
@RequestMapping
(
value
=
"/analysis"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
List
<
ProductAnalysisVo
>>
productAnalysis
(
@ModelAttribute
ProductAnalysisParam
param
){
List
<
ProductAnalysisVo
>
result
=
productStatisticalService
.
productAnalysis
(
param
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"主营类目销售统计"
)
@RequestMapping
(
value
=
"/category/statistical"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
CategoryStatisticalVo
>>
categoryStatistical
(
@ModelAttribute
ProductAnalysisParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
CategoryStatisticalVo
>
result
=
productStatisticalService
.
categoryStatistical
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
@ApiOperation
(
value
=
"商品销售统计"
)
@RequestMapping
(
value
=
"/sales/statistical"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsProductStatisticalVo
>>
getProductStatistical
(
@ModelAttribute
PmsProductStatisticaParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
PmsProductStatisticalVo
>
result
=
productStatisticalService
.
getProductStatistical
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
}
mall-admin/src/main/java/com/macro/mall/controller/statistical/ShopStatisticalController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
controller
.
statistical
;
/*
*
*/
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.statistical.SalesStatisticalParam
;
import
com.macro.mall.domain.vo.statistical.SalesStatisticalVo
;
import
com.macro.mall.domain.vo.statistical.ShopStatisticalVo
;
import
com.macro.mall.service.statistical.ShopStatisticalService
;
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.math.BigDecimal
;
import
java.util.List
;
/**
* @ClassName ShopStatisticalController
* @Description TODO
* @Author cxh
* @Date 2020/4/16 10:58
* @Version 1.0
*/
@RestController
@Api
(
tags
=
"店铺统计"
,
description
=
"店铺统计"
)
@RequestMapping
(
value
=
"/shop/statistical"
)
public
class
ShopStatisticalController
{
@Resource
private
ShopStatisticalService
shopStatisticalService
;
@ApiOperation
(
value
=
"新增店铺统计"
)
@RequestMapping
(
value
=
"/new/add"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"type"
,
value
=
"查询类型(1天2月3季度4年)"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"query"
)
})
public
CommonResult
<
List
<
ShopStatisticalVo
>>
shopStatistical
(
@RequestParam
Integer
type
,
String
begin
,
String
end
){
List
<
ShopStatisticalVo
>
result
=
shopStatisticalService
.
shopStatistical
(
type
,
begin
,
end
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"店铺排行"
)
@RequestMapping
(
value
=
"/shop/rank"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"type"
,
value
=
"查询类型(1销售额2订单量)"
,
required
=
true
,
dataType
=
"int"
,
paramType
=
"query"
)
})
public
CommonResult
<
List
<
BigDecimal
>>
shopRank
(
@RequestParam
Integer
type
,
String
begin
,
String
end
){
List
<
BigDecimal
>
result
=
shopStatisticalService
.
shopRank
(
type
,
begin
,
end
);
return
CommonResult
.
success
(
result
);
}
@ApiOperation
(
value
=
"店铺销售统计"
)
@RequestMapping
(
value
=
"/sales"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
SalesStatisticalVo
>>
salesStatistical
(
@ModelAttribute
SalesStatisticalParam
param
,
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"5"
)
Integer
pageSize
,
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
){
List
<
SalesStatisticalVo
>
result
=
shopStatisticalService
.
salesStatistical
(
param
,
pageSize
,
pageNum
);
return
CommonResult
.
success
(
CommonPage
.
restPage
(
result
));
}
}
mall-admin/src/main/java/com/macro/mall/scheduled/ProductTask.java
View file @
2ea78370
...
@@ -20,11 +20,12 @@ public class ProductTask {
...
@@ -20,11 +20,12 @@ public class ProductTask {
/**
/**
* cron表达式:Seconds Minutes Hours DayofMonth Month DayofWeek [Year]
* cron表达式:Seconds Minutes Hours DayofMonth Month DayofWeek [Year]
* 每10分钟扫描一次,扫描定时未上架的商品
* 每10分钟扫描一次,扫描定时未上架的商品
*/
@Scheduled(cron = "0 0/5 * ? * ?")
@Scheduled(cron = "0 0/5 * ? * ?")
private void cancelTimeOutOrder(){
private void cancelTimeOutOrder(){
log.info("定时上架商品:start");
log.info("定时上架商品:start");
pmsProductService.regularlyUpdatePublishStatus();
pmsProductService.regularlyUpdatePublishStatus();
log.info("定时上架商品:end");
log.info("定时上架商品:end");
}
}
*/
}
}
mall-admin/src/main/java/com/macro/mall/scheduled/PromotionTask.java
View file @
2ea78370
...
@@ -30,7 +30,7 @@ public class PromotionTask {
...
@@ -30,7 +30,7 @@ public class PromotionTask {
/**
/**
* cron表达式:Seconds Minutes Hours DayofMonth Month DayofWeek [Year]
* cron表达式:Seconds Minutes Hours DayofMonth Month DayofWeek [Year]
* 定时扫描,扫描已开始的活动
* 定时扫描,扫描已开始的活动
*/
@Scheduled(cron = "0 0/10 * * * ?")
@Scheduled(cron = "0 0/10 * * * ?")
private void promotion() {
private void promotion() {
//开启
//开启
...
@@ -101,4 +101,5 @@ public class PromotionTask {
...
@@ -101,4 +101,5 @@ public class PromotionTask {
couponMapper.updateByPrimaryKeySelective(coupon);
couponMapper.updateByPrimaryKeySelective(coupon);
});
});
}
}
*/
}
}
mall-admin/src/main/java/com/macro/mall/scheduled/SettlementTask.java
View file @
2ea78370
...
@@ -27,7 +27,7 @@ public class SettlementTask {
...
@@ -27,7 +27,7 @@ public class SettlementTask {
/**
/**
* cron表达式:Seconds Minutes Hours DayofMonth Month DayofWeek [Year]
* cron表达式:Seconds Minutes Hours DayofMonth Month DayofWeek [Year]
* 每天凌晨2点扫描一次,扫描待结算订单
* 每天凌晨2点扫描一次,扫描待结算订单
*/
@Scheduled(cron = "0 0 2 * * ?")
@Scheduled(cron = "0 0 2 * * ?")
// @Scheduled(cron = "0 0/5 * * * ?")
// @Scheduled(cron = "0 0/5 * * * ?")
private void mchtSettlement() {
private void mchtSettlement() {
...
@@ -41,4 +41,5 @@ public class SettlementTask {
...
@@ -41,4 +41,5 @@ public class SettlementTask {
memberSettlementService.memberOrder(memberJob);
memberSettlementService.memberOrder(memberJob);
log.info("定时扫描已完成订单-会员佣金:end");
log.info("定时扫描已完成订单-会员佣金:end");
}
}
*/
}
}
mall-admin/src/main/java/com/macro/mall/scheduled/YouZanOrderTask.java
View file @
2ea78370
...
@@ -27,7 +27,7 @@ public class YouZanOrderTask {
...
@@ -27,7 +27,7 @@ public class YouZanOrderTask {
/**
/**
* cron表达式:Seconds Minutes Hours DayofMonth Month DayofWeek [Year]
* cron表达式:Seconds Minutes Hours DayofMonth Month DayofWeek [Year]
* 每天凌晨1点分钟扫描一次,扫描定时未上架的商品
* 每天凌晨1点分钟扫描一次,扫描定时未上架的商品
*/
@Scheduled(cron = "0 0 1 * * ?")
@Scheduled(cron = "0 0 1 * * ?")
private void syncOrder() {
private void syncOrder() {
log.info("定时同步有赞订单:start");
log.info("定时同步有赞订单:start");
...
@@ -41,4 +41,5 @@ public class YouZanOrderTask {
...
@@ -41,4 +41,5 @@ public class YouZanOrderTask {
});
});
log.info("定时同步有赞订单:end");
log.info("定时同步有赞订单:end");
}
}
*/
}
}
mall-admin/src/main/resources/application.yml
View file @
2ea78370
server
:
server
:
port
:
818
0
port
:
818
2
spring
:
spring
:
datasource
:
datasource
:
url
:
jdbc:mysql://
115.29.198.90
:3306/quanxing?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
url
:
jdbc:mysql://
47.98.234.186
:3306/quanxing?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username
:
root
username
:
root
password
:
root
password
:
liufang@xm999.COM
druid
:
druid
:
initial-size
:
5
#连接池初始化大小
initial-size
:
5
#连接池初始化大小
min-idle
:
10
#最小空闲连接数
min-idle
:
10
#最小空闲连接数
...
@@ -123,7 +123,7 @@ swagger:
...
@@ -123,7 +123,7 @@ swagger:
enable
:
true
#关闭swagger配置 true开启 false关闭
enable
:
true
#关闭swagger配置 true开启 false关闭
pay
:
pay
:
wx
:
wx
:
url
:
http://115.29.198.90:820
1
/mall-portal/api/z
url
:
http://115.29.198.90:820
2
/mall-portal/api/z
youzanupload
:
youzanupload
:
# url: D:/pic/
# url: D:/pic/
url
:
/opt/
url
:
/opt/
...
...
mall-admin/src/main/resources/bootstrap-dev.yml
View file @
2ea78370
...
@@ -10,4 +10,4 @@ spring:
...
@@ -10,4 +10,4 @@ spring:
eureka
:
eureka
:
client
:
client
:
service-url
:
service-url
:
defaultZone
:
http://localhost:8001/eureka/
defaultZone
:
http://localhost:8002/eureka/
\ No newline at end of file
\ No newline at end of file
mall-admin/src/main/resources/bootstrap-prod.yml
View file @
2ea78370
...
@@ -10,6 +10,6 @@ spring:
...
@@ -10,6 +10,6 @@ spring:
eureka
:
eureka
:
client
:
client
:
service-url
:
service-url
:
defaultZone
:
http://mall-registry:800
1
/eureka/
defaultZone
:
http://mall-registry:800
2
/eureka/
instance
:
instance
:
prefer-ip-address
:
true
prefer-ip-address
:
true
\ No newline at end of file
mall-config/src/main/resources/application-dev.yml
View file @
2ea78370
eureka
:
eureka
:
client
:
client
:
service-url
:
service-url
:
defaultZone
:
http://localhost:8001/eureka/
defaultZone
:
http://localhost:8002/eureka/
\ No newline at end of file
\ No newline at end of file
mall-config/src/main/resources/application-native.yml
View file @
2ea78370
...
@@ -2,4 +2,4 @@ eureka:
...
@@ -2,4 +2,4 @@ eureka:
client
:
client
:
service-url
:
service-url
:
# defaultZone: http://localhost:8001/eureka/
# defaultZone: http://localhost:8001/eureka/
defaultZone
:
http://mall-registry:8001/eureka/
defaultZone
:
http://mall-registry:8002/eureka/
\ No newline at end of file
\ No newline at end of file
mall-config/src/main/resources/application-prod.yml
View file @
2ea78370
eureka
:
eureka
:
client
:
client
:
service-url
:
service-url
:
defaultZone
:
http://mall-registry:800
1
/eureka/
defaultZone
:
http://mall-registry:800
2
/eureka/
instance
:
instance
:
prefer-ip-address
:
true
prefer-ip-address
:
true
\ No newline at end of file
mall-config/src/main/resources/application.yml
View file @
2ea78370
server
:
server
:
port
:
830
1
port
:
830
2
spring
:
spring
:
application
:
application
:
name
:
mall-config
name
:
mall-config
...
...
mall-gateway/src/main/resources/application-dev.yml
View file @
2ea78370
eureka
:
eureka
:
client
:
client
:
service-url
:
service-url
:
defaultZone
:
http://localhost:800
1
/eureka/
defaultZone
:
http://localhost:800
2
/eureka/
registry-fetch-interval-seconds
:
10
registry-fetch-interval-seconds
:
10
mall-gateway/src/main/resources/application-prod.yml
View file @
2ea78370
eureka
:
eureka
:
client
:
client
:
service-url
:
service-url
:
defaultZone
:
http://mall-registry:800
1
/eureka/
defaultZone
:
http://mall-registry:800
2
/eureka/
registry-fetch-interval-seconds
:
10
registry-fetch-interval-seconds
:
10
instance
:
instance
:
prefer-ip-address
:
true
prefer-ip-address
:
true
mall-gateway/src/main/resources/application.yml
View file @
2ea78370
server
:
server
:
port
:
8
2
01
port
:
8
4
01
spring
:
spring
:
application
:
application
:
name
:
mall-gateway
name
:
mall-gateway
...
...
mall-mbg/src/main/resources/generatorConfig.xml
View file @
2ea78370
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.macro.mall.mapper"
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"com.macro.mall.mapper"
targetProject=
"mall-mbg/src/main/java"
/>
targetProject=
"mall-mbg/src/main/java"
/>
<!--生成全部表tableName设为%-->
<!--生成全部表tableName设为%-->
<table
tableName=
"
%
"
>
<table
tableName=
"
pms_product
"
>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
<generatedKey
column=
"id"
sqlStatement=
"MySql"
identity=
"true"
/>
</table>
</table>
...
...
mall-portal/src/main/java/com/macro/mall/portal/controller/member/UmsMemberController.java
View file @
2ea78370
...
@@ -23,7 +23,7 @@ import java.util.Map;
...
@@ -23,7 +23,7 @@ import java.util.Map;
* Created by macro on 2018/8/3.
* Created by macro on 2018/8/3.
*/
*/
@Controller
@Controller
@Api
(
tags
=
"
权星小程序
_会员相关接口"
,
description
=
"会员登录注册管理"
)
@Api
(
tags
=
"
文档下载前台
_会员相关接口"
,
description
=
"会员登录注册管理"
)
@RequestMapping
(
"/sso"
)
@RequestMapping
(
"/sso"
)
public
class
UmsMemberController
{
public
class
UmsMemberController
{
@Value
(
"${jwt.tokenHeader}"
)
@Value
(
"${jwt.tokenHeader}"
)
...
@@ -36,7 +36,7 @@ public class UmsMemberController {
...
@@ -36,7 +36,7 @@ public class UmsMemberController {
private
UmsMemberPhoneReviewService
memberPhoneReviewService
;
private
UmsMemberPhoneReviewService
memberPhoneReviewService
;
@ApiOperation
(
"
权星小程序
_会员根据手机号登录"
)
@ApiOperation
(
"
文档下载前台
_会员根据手机号登录"
)
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
CommonResult
login
(
@RequestParam
String
phone
,
public
CommonResult
login
(
@RequestParam
String
phone
,
...
@@ -45,7 +45,7 @@ public class UmsMemberController {
...
@@ -45,7 +45,7 @@ public class UmsMemberController {
}
}
@ApiOperation
(
"
权星小程序
_用户修改密码"
)
@ApiOperation
(
"
文档下载前台
_用户修改密码"
)
@RequestMapping
(
value
=
"/updatePassword"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/updatePassword"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
CommonResult
updatePassword
(
@RequestBody
UmsMemberRequestParam
umsMemberRequestParam
)
{
public
CommonResult
updatePassword
(
@RequestBody
UmsMemberRequestParam
umsMemberRequestParam
)
{
...
@@ -56,7 +56,7 @@ public class UmsMemberController {
...
@@ -56,7 +56,7 @@ public class UmsMemberController {
return
CommonResult
.
failed
(
res
.
getMsg
());
return
CommonResult
.
failed
(
res
.
getMsg
());
}
}
@ApiOperation
(
"
权星小程序
_用户修改手机号"
)
@ApiOperation
(
"
文档下载前台
_用户修改手机号"
)
@RequestMapping
(
value
=
"/updatePhone"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/updatePhone"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
CommonResult
updatePhone
(
@RequestBody
UmsMemberRequestParam
umsMemberRequestParam
)
{
public
CommonResult
updatePhone
(
@RequestBody
UmsMemberRequestParam
umsMemberRequestParam
)
{
...
@@ -67,7 +67,7 @@ public class UmsMemberController {
...
@@ -67,7 +67,7 @@ public class UmsMemberController {
return
CommonResult
.
failed
(
res
.
getMsg
());
return
CommonResult
.
failed
(
res
.
getMsg
());
}
}
@ApiOperation
(
"
权星后
台_根据会员id修改一条会员数据"
)
@ApiOperation
(
"
文档下载前
台_根据会员id修改一条会员数据"
)
@RequestMapping
(
value
=
"/updateOneById"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/updateOneById"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
@ResponseBody
public
CommonResult
updateOneById
(
@ApiParam
(
"会员对象,传入Id,以及对应的要修改的值.例如帐号启用状态:0->禁用;1->启用 禁用账号在对应的字段传入0"
)
@RequestBody
UmsMember
umsMember
){
public
CommonResult
updateOneById
(
@ApiParam
(
"会员对象,传入Id,以及对应的要修改的值.例如帐号启用状态:0->禁用;1->启用 禁用账号在对应的字段传入0"
)
@RequestBody
UmsMember
umsMember
){
...
...
mall-portal/src/main/java/com/macro/mall/portal/controller/quanxing/OmsChoseProductController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
portal
.
controller
.
quanxing
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.OmsChoseProduct
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.PmsSupplierAuditDto
;
import
com.macro.mall.model.dto.quanxing.OmsChoseProductDto
;
import
com.macro.mall.service.quanxing.IOmsChoseProductService
;
import
com.macro.mall.service.quanxing.IPmsSupplierAuditService
;
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
java.util.List
;
@Controller
@RequestMapping
(
"/omsChoseProduct"
)
@Api
(
tags
=
"权星小程序_选择商品相关接口"
,
description
=
"选择商品控制器"
)
public
class
OmsChoseProductController
{
@Autowired
private
IOmsChoseProductService
omsChoseProductService
;
@ApiOperation
(
"权星小程序_选择商品分页查询"
)
@ResponseBody
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
OmsChoseProductDto
>>
getListPage
(
@ApiParam
(
"页数"
)
@RequestParam
(
"pageNum"
)
Integer
pageNum
,
@ApiParam
(
"每页大小"
)
@RequestParam
(
"pageSize"
)
Integer
pageSize
,
@ApiParam
(
"会员id"
)
@RequestParam
(
"memberId"
)
Long
memberId
){
return
CommonResult
.
success
(
CommonPage
.
restPage
(
this
.
omsChoseProductService
.
getListPage
(
pageNum
,
pageSize
,
memberId
)));
}
@ApiOperation
(
"权星小程序_选择商品插入一条数据"
)
@ResponseBody
@RequestMapping
(
value
=
"/insertChoseProduct"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
insertChoseProduct
(
@RequestBody
OmsChoseProduct
omsChoseProduct
){
ResultMsg
res
=
this
.
omsChoseProductService
.
insertChoseProduct
(
omsChoseProduct
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星小程序_选择商品删除一条数据"
)
@ResponseBody
@RequestMapping
(
value
=
"/deleteChoseProduct"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
deleteChoseProduct
(
@RequestBody
OmsChoseProductDto
omsChoseProductDto
){
ResultMsg
res
=
this
.
omsChoseProductService
.
deleteChoseProduct
(
omsChoseProductDto
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/quanxing/PmsProductAttributeCategoryController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
portal
.
controller
.
quanxing
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsProductAttributeCategory
;
import
com.macro.mall.service.quanxing.PmsProductAttributeCategoryService
;
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
@Api
(
tags
=
"权星小程序_商品分类相关接口"
,
description
=
"商品属性分类管理"
)
@RequestMapping
(
"/pmsProductAttributeCategory"
)
public
class
PmsProductAttributeCategoryController
{
@Autowired
private
PmsProductAttributeCategoryService
productAttributeCategoryService
;
@ApiOperation
(
"权星获取所有商品分类 (默认不传分页参数则不分页查询)"
)
@RequestMapping
(
value
=
"/getAttributeCategoryList"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
getAttributeCategoryList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"page"
)
Integer
page
,
@ApiParam
(
"大小"
)
@RequestParam
(
"size"
)
Integer
size
,
@ApiParam
(
"非必传 不传父级id 则查所有分类"
)
@RequestParam
(
"parentId"
)
Long
parentId
){
return
CommonResult
.
success
(
this
.
productAttributeCategoryService
.
getAttributeCategoryList
(
page
,
size
,
parentId
));
}
@ApiOperation
(
"根据名称查询分类 一级名称返回一条数据 二级名称返回二条数据 三级名称返回三条数据"
)
@RequestMapping
(
value
=
"/getAttributeCategoryListByName"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
List
<
PmsProductAttributeCategory
>>
getAttributeCategoryListByName
(
@ApiParam
(
"分类名称"
)
@RequestParam
(
"name"
)
String
name
){
return
CommonResult
.
success
(
this
.
productAttributeCategoryService
.
getAtributeCategoryListByName
(
name
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/quanxing/PmsProductController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
portal
.
controller
.
quanxing
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.dto.PmsProductRequestParam
;
import
com.macro.mall.model.PmsProduct
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.service.product.PmsProductService
;
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.*
;
@Controller
@RequestMapping
(
"/pmsProduct"
)
@Api
(
tags
=
"权星小程序_商品相关接口"
,
description
=
"商品控制器"
)
public
class
PmsProductController
{
@Autowired
private
PmsProductService
pmsProductService
;
@ApiOperation
(
"权星小程序_商品分页查询"
)
@ResponseBody
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsProduct
>>
getPageList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"page"
)
Integer
page
,
@ApiParam
(
"每页大小"
)
@RequestParam
(
"size"
)
Integer
size
,
@ApiParam
(
"模糊查询商品名称 "
)
@RequestParam
(
"name"
)
String
name
,
@ApiParam
(
"是否新品 新品状态:0->不是新品;1->新品 "
)
@RequestParam
(
"newStatus"
)
Integer
newStatus
,
@ApiParam
(
"供应商id"
)
@RequestParam
(
"mchtId"
)
Long
mchtId
,
@ApiParam
(
"审核状态:0->未审核;1->审核通过 2->驳回"
)
@RequestParam
(
"verifyStatus"
)
Integer
verifyStatus
,
@ApiParam
(
"上架状态:0->下架;1->上架"
)
@RequestParam
(
"publishStatus"
)
Integer
publishStatus
,
@ApiParam
(
"一级分类id"
)
@RequestParam
(
name
=
"productCategoryIdI"
,
required
=
false
)
Long
productCategoryIdI
,
@ApiParam
(
"二级分类id"
)
@RequestParam
(
name
=
"productCategoryId"
,
required
=
false
)
Long
productCategoryId
,
@ApiParam
(
"三级分类id"
)
@RequestParam
(
name
=
"productCategoryIdIII"
,
required
=
false
)
Long
productCategoryIdIII
,
@ApiParam
(
"排序:(例如根据价格降序 传入price DESC 根据价格升序传入price ASC) "
)
@RequestParam
(
"orderBy"
)
String
orderBy
){
return
CommonResult
.
success
(
CommonPage
.
restPage
(
this
.
pmsProductService
.
getAppPageList
(
page
,
size
,
name
,
newStatus
,
mchtId
,
verifyStatus
,
publishStatus
,
productCategoryIdI
,
productCategoryId
,
productCategoryIdIII
,
orderBy
)));
}
@ApiOperation
(
"权星小程序_获取商品信息根据商品id"
)
@RequestMapping
(
value
=
"/getProductInfo"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
<
PmsProductRequestParam
>
getProductInfo
(
@ApiParam
(
"商品Id"
)
@RequestParam
(
value
=
"id"
)
Long
id
)
{
return
CommonResult
.
success
(
pmsProductService
.
getProductById
(
id
));
}
@ApiOperation
(
"权星小程序_获取供应商商品状态数量"
)
@RequestMapping
(
value
=
"/getSupplierProductStatus"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
getSupplierProductStatus
()
{
ResultMsg
res
=
this
.
pmsProductService
.
getSupplierProductStatus
();
return
CommonResult
.
success
(
res
.
getContext
());
}
@ApiOperation
(
"权星小程序_获取管理员商品状态数量"
)
@RequestMapping
(
value
=
"/getAdminProductStatus"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
CommonResult
getAdminProductStatus
()
{
ResultMsg
res
=
this
.
pmsProductService
.
getAdminProductStatus
();
return
CommonResult
.
success
(
res
.
getContext
());
}
@ApiOperation
(
"权星小程序_根据商品id修改一条商品数据"
)
@RequestMapping
(
value
=
"/updateOneById"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
updateOneById
(
@ApiParam
(
"商品对象,传入Id,以及对应的要修改的值.例如上架状态:0->下架;1->上架' 传入0为下架操作"
)
@RequestBody
PmsProduct
pmsProduct
){
ResultMsg
res
=
this
.
pmsProductService
.
updateOneById
(
pmsProduct
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星小程序_创建商品"
)
@RequestMapping
(
value
=
"/addProduct"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
addProduct
(
@RequestBody
PmsProductRequestParam
pmsProductRequestParam
){
ResultMsg
res
=
this
.
pmsProductService
.
addProduct
(
pmsProductRequestParam
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星后台_修改商品后保存操作 如果sku有变动则需传入pmsProductSkuValueList以及pmsSkuStockList 没有变动则不需传"
)
@RequestMapping
(
value
=
"/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:product:update')")
public
CommonResult
update
(
@RequestBody
PmsProductRequestParam
pmsProductRequestParam
)
{
ResultMsg
res
=
pmsProductService
.
updateProduct
(
pmsProductRequestParam
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/quanxing/PmsSearchWordController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
portal
.
controller
.
quanxing
;
import
com.macro.mall.common.api.CommonPage
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.PmsSearchWord
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.quanxing.PmsSearchWordRequestParamDto
;
import
com.macro.mall.service.platform.PmsSearchWordService
;
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.*
;
@Controller
@RequestMapping
(
"/pmsSearchWord"
)
@Api
(
tags
=
"权星小程序_搜索字相关接口"
,
description
=
"搜索内容控制器"
)
public
class
PmsSearchWordController
{
@Autowired
private
PmsSearchWordService
pmsSearchWordService
;
@ApiOperation
(
"权星小程序_搜索词分页查询"
)
@ResponseBody
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
<
CommonPage
<
PmsSearchWord
>>
getPageList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"pageNum"
)
Integer
pageNum
,
@ApiParam
(
"每页大小"
)
@RequestParam
(
"pageSize"
)
Integer
pageSize
){
return
CommonResult
.
success
(
CommonPage
.
restPage
(
this
.
pmsSearchWordService
.
getPageList
(
pageNum
,
pageSize
)));
}
@ApiOperation
(
"权星小程序_搜索删除"
)
@ResponseBody
@RequestMapping
(
value
=
"/deleteByIds"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
deleteByIds
(
@ApiParam
(
"请求对象 如果ids为空 则删除当前会员下的所有搜索词"
)
@RequestBody
PmsSearchWordRequestParamDto
pmsSearchWordRequestParamDto
){
ResultMsg
res
=
this
.
pmsSearchWordService
.
deleteSearchWords
(
pmsSearchWordRequestParamDto
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/quanxing/PmsSupplierAuditController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
portal
.
controller
.
quanxing
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.model.dto.PmsSupplierAuditDto
;
import
com.macro.mall.model.dto.quanxing.PmsSupplierAuditRequest
;
import
com.macro.mall.service.quanxing.IPmsSupplierAuditService
;
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.*
;
@Controller
@RequestMapping
(
"/pmsSupplierAudit"
)
@Api
(
tags
=
"权星小程序_供应商相关接口"
,
description
=
"申请供应商控制器"
)
public
class
PmsSupplierAuditController
{
@Autowired
private
IPmsSupplierAuditService
pmsSupplierAuditService
;
@ApiOperation
(
"权星小程序_申请供应商"
)
@ResponseBody
@RequestMapping
(
value
=
"/auditSupplier"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
auditSupplier
(
@ApiParam
(
"申请供应商所需参数对象"
)
@RequestBody
PmsSupplierAuditDto
pmsSupplierAuditDto
){
ResultMsg
res
=
this
.
pmsSupplierAuditService
.
insertSupplierAudit
(
pmsSupplierAuditDto
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星小程序_审核申请供应商"
)
@ResponseBody
@RequestMapping
(
value
=
"/auditStatus"
,
method
=
RequestMethod
.
POST
)
public
CommonResult
auditStatus
(
@RequestBody
PmsSupplierAuditRequest
pmsSupplierAuditRequest
){
ResultMsg
res
=
this
.
pmsSupplierAuditService
.
auditSupplier
(
pmsSupplierAuditRequest
);
if
(
res
.
isFlag
()){
return
CommonResult
.
success
(
null
,
res
.
getMsg
());
}
return
CommonResult
.
failed
(
res
.
getMsg
());
}
@ApiOperation
(
"权星后台_通过审核Id得到 相关数据"
)
@ResponseBody
@RequestMapping
(
value
=
"/getSupplierAuditById"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
getSupplierAuditById
(
@ApiParam
(
"审核id"
)
@RequestParam
(
"id"
)
Long
id
){
return
CommonResult
.
success
(
this
.
pmsSupplierAuditService
.
getSupplierAuditById
(
id
));
}
@ApiOperation
(
"权星后台_申请供应商分页数据"
)
@ResponseBody
@RequestMapping
(
value
=
"/getPageList"
,
method
=
RequestMethod
.
GET
)
public
CommonResult
getPageList
(
@ApiParam
(
"页数"
)
@RequestParam
(
"page"
)
Integer
page
,
@ApiParam
(
"每页大小"
)
@RequestParam
(
"size"
)
Integer
size
,
@ApiParam
(
"供应商名称"
)
@RequestParam
(
"name"
)
String
name
,
@ApiParam
(
"手机号"
)
@RequestParam
(
"phone"
)
String
phone
,
@ApiParam
(
"(非必传)审核状态 0待审核 1审核通过 2审核不通过"
)
@RequestParam
(
"status"
)
Integer
status
){
return
CommonResult
.
success
(
this
.
pmsSupplierAuditService
.
getPageList
(
page
,
size
,
name
,
phone
,
status
));
}
}
mall-portal/src/main/java/com/macro/mall/portal/controller/quanxing/SendMsgController.java
deleted
100644 → 0
View file @
160e551d
package
com
.
macro
.
mall
.
portal
.
controller
.
quanxing
;
import
com.macro.mall.common.api.CommonResult
;
import
com.macro.mall.domain.SmsResult
;
import
com.macro.mall.domain.vo.SmsVo
;
import
com.macro.mall.model.common.ResultMsg
;
import
com.macro.mall.service.common.CommonService
;
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.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
@Controller
@RequestMapping
(
"/sendMsg"
)
@Api
(
tags
=
"权星小程序_发送短信相关接口"
,
description
=
"短信控制器"
)
public
class
SendMsgController
{
@Autowired
private
CommonService
commonService
;
@ApiOperation
(
"权星小程序_通过手机号发送短信验证码"
)
@RequestMapping
(
value
=
"/sendMsg"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
CommonResult
<
SmsResult
>
sendMsg
(
SmsVo
smsVo
)
{
return
CommonResult
.
success
(
this
.
commonService
.
sendSms
(
smsVo
));
}
}
mall-portal/src/main/resources/application.yml
View file @
2ea78370
server
:
server
:
port
:
808
5
port
:
808
6
spring
:
spring
:
datasource
:
datasource
:
url
:
jdbc:mysql://
115.29.198.90
:3306/quanxing?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
url
:
jdbc:mysql://
47.98.234.186
:3306/quanxing?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username
:
root
username
:
root
password
:
root
password
:
liufang@xm999.COM
druid
:
druid
:
initial-size
:
5
#连接池初始化大小
initial-size
:
5
#连接池初始化大小
min-idle
:
10
#最小空闲连接数
min-idle
:
10
#最小空闲连接数
...
...
mall-portal/src/main/resources/bootstrap-dev.yml
View file @
2ea78370
...
@@ -10,4 +10,4 @@ spring:
...
@@ -10,4 +10,4 @@ spring:
eureka
:
eureka
:
client
:
client
:
service-url
:
service-url
:
defaultZone
:
http://localhost:8001/eureka/
defaultZone
:
http://localhost:8002/eureka/
\ No newline at end of file
\ No newline at end of file
mall-portal/src/main/resources/bootstrap-prod.yml
View file @
2ea78370
...
@@ -10,6 +10,6 @@ spring:
...
@@ -10,6 +10,6 @@ spring:
eureka
:
eureka
:
client
:
client
:
service-url
:
service-url
:
defaultZone
:
http://mall-registry:800
1
/eureka/
defaultZone
:
http://mall-registry:800
2
/eureka/
instance
:
instance
:
prefer-ip-address
:
true
prefer-ip-address
:
true
\ No newline at end of file
mall-registry/src/main/resources/application.yml
View file @
2ea78370
server
:
server
:
port
:
800
1
port
:
800
2
spring
:
spring
:
application
:
application
:
name
:
mall-registry
name
:
mall-registry
...
...
quanxing.iml
deleted
100644 → 0
View file @
160e551d
<?xml version="1.0" encoding="UTF-8"?>
<module
org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule=
"true"
type=
"JAVA_MODULE"
version=
"4"
>
<component
name=
"NewModuleRootManager"
LANGUAGE_LEVEL=
"JDK_1_8"
>
<output
url=
"file://$MODULE_DIR$/target/classes"
/>
<output-test
url=
"file://$MODULE_DIR$/target/test-classes"
/>
<content
url=
"file://$MODULE_DIR$"
>
<excludeFolder
url=
"file://$MODULE_DIR$/target"
/>
</content>
<orderEntry
type=
"inheritedJdk"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-starter-actuator:2.1.7.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-starter:2.1.7.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot:2.1.7.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.7.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-starter-logging:2.1.7.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: ch.qos.logback:logback-classic:1.2.3"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: ch.qos.logback:logback-core:1.2.3"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.apache.logging.log4j:log4j-api:2.11.2"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.slf4j:jul-to-slf4j:1.7.26"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: javax.annotation:javax.annotation-api:1.3.2"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"RUNTIME"
name=
"Maven: org.yaml:snakeyaml:1.23"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.1.7.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-actuator:2.1.7.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: com.fasterxml.jackson.core:jackson-databind:2.9.9"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: com.fasterxml.jackson.core:jackson-core:2.9.9"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-context:5.1.9.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-expression:5.1.9.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"RUNTIME"
name=
"Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.9"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: io.micrometer:micrometer-core:1.1.5"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.hdrhistogram:HdrHistogram:2.1.9"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.latencyutils:LatencyUtils:2.0.3"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-starter-aop:2.1.7.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-aop:5.1.9.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-beans:5.1.9.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.aspectj:aspectjweaver:1.9.4"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.springframework.boot:spring-boot-starter-test:2.1.7.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.springframework.boot:spring-boot-test:2.1.7.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.7.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: com.jayway.jsonpath:json-path:2.4.0"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: net.minidev:json-smart:2.3"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: net.minidev:accessors-smart:1.2"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.ow2.asm:asm:5.0.4"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.slf4j:slf4j-api:1.7.26"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: junit:junit:4.12"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.assertj:assertj-core:3.11.1"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.mockito:mockito-core:2.23.4"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: net.bytebuddy:byte-buddy:1.9.16"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: net.bytebuddy:byte-buddy-agent:1.9.16"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.objenesis:objenesis:2.6"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.hamcrest:hamcrest-core:1.3"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.hamcrest:hamcrest-library:1.3"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.skyscreamer:jsonassert:1.5.0"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-core:5.1.9.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework:spring-jcl:5.1.9.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.springframework:spring-test:5.1.9.RELEASE"
level=
"project"
/>
<orderEntry
type=
"library"
scope=
"TEST"
name=
"Maven: org.xmlunit:xmlunit-core:2.6.3"
level=
"project"
/>
<orderEntry
type=
"library"
name=
"Maven: org.springframework.boot:spring-boot-configuration-processor:2.1.7.RELEASE"
level=
"project"
/>
</component>
</module>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment