| | |
| | | * 获取用户列表 |
| | | */ |
| | | @GetMapping("/getAppuserPage") |
| | | @ApiOperation(value = "用户列表", tags = {"后台管理"}) |
| | | @ApiOperation(value = "用户列表", tags = {"管理后台"}) |
| | | public R<IPage<AppUser>> getAppuserPage(@ApiParam("页码") @RequestParam Integer pageNum, |
| | | @ApiParam("每一页数据大小") Integer pageSize, |
| | | AppUser appUser) |
| | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/getAgreementByType/{type}") |
| | | @ApiOperation(value = "获取协议详情", tags = {"管理后台-协议管理"}) |
| | | @ApiOperation(value = "协议管理-详情", tags = {"管理后台"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "类型(1=用户协议,2=隐私协议,3=技师上门免责声明,4=注销协议,5门店提现免责声明)", name = "type", required = true, dataType = "int"), |
| | | }) |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/saveAgreement") |
| | | @ApiOperation(value = "保存协议", tags = {"管理后台-协议管理"}) |
| | | @ApiOperation(value = "协议管理-保存协议", tags = {"管理后台"}) |
| | | public R saveAgreement(@RequestBody Agreement agreement){ |
| | | if(null != agreement.getId()){ |
| | | agreementService.updateById(agreement); |
| | |
| | | return R.ok(list); |
| | | } |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "添加", tags = {"后台-广告管理-banner管理"}) |
| | | @ApiOperation(value = "广告管理-banner管理-添加", tags = {"管理后台"}) |
| | | public R add(@RequestBody Banner banner){ |
| | | bannerService.save(banner); |
| | | return R.ok(); |
| | | } |
| | | @GetMapping("/delete") |
| | | @ApiOperation(value = "删除", tags = {"后台-广告管理-banner管理"}) |
| | | @ApiOperation(value = "广告管理-banner管理-删除", tags = {"管理后台"}) |
| | | public R delete(@RequestParam Integer id){ |
| | | bannerService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | @PostMapping("/edit") |
| | | @ApiOperation(value = "修改", tags = {"后台-广告管理-banner管理"}) |
| | | @ApiOperation(value = "广告管理-banner管理-修改", tags = {"管理后台"}) |
| | | public R edit(@RequestBody Banner banner){ |
| | | bannerService.updateById(banner); |
| | | return R.ok(); |
| | | } |
| | | @GetMapping("/detail") |
| | | @ApiOperation(value = "详情", tags = {"后台-广告管理-banner管理"}) |
| | | @ApiOperation(value = "广告管理-banner管理-详情", tags = {"管理后台"}) |
| | | public R detail(@RequestParam Integer id){ |
| | | Banner byId = bannerService.getById(id); |
| | | return R.ok(byId); |
| | | } |
| | | @GetMapping("/page/list") |
| | | @ApiOperation(value = "列表", tags = {"后台-广告管理--banner"}) |
| | | @ApiOperation(value = "广告管理-banner-列表", tags = {"管理后台"}) |
| | | public R<Page<Banner>> pagelist(String name, Integer jumpType, Integer position,Integer pageNum,Integer pageSize){ |
| | | Page<Banner> page = bannerService.lambdaQuery().like(StringUtils.isNotEmpty(name), Banner::getName, name) |
| | | .eq(jumpType!=null,Banner::getJumpType, jumpType) |
| | |
| | | private AppUserClient appUserClient; |
| | | //查看详情 |
| | | @PostMapping("/detail") |
| | | @ApiOperation(value = "详情", tags = {"后台-优惠劵"}) |
| | | @ApiOperation(value = "活动管理-优惠劵管理-详情", tags = {"管理后台"}) |
| | | public R<CouponInfo> detail(@RequestParam("id") Integer id){ |
| | | CouponInfo byId = couponInfoService.getById(id); |
| | | return R.ok(byId); |
| | |
| | | * 新增 |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation(value = "商品管理-门店特殊售价-新增", tags = {"后台管理"}) |
| | | @ApiOperation(value = "商品管理-门店特殊售价-新增", tags = {"管理后台"}) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R<Void> add(@RequestBody GoodsBargainPrice goodsBargainPrice) { |
| | | LoginUser loginUserApplet = tokenService.getLoginUserApplet(); |
| | |
| | | * 删除 |
| | | */ |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation(value = "商品管理-门店特殊售价-删除", tags = {"后台管理"}) |
| | | @ApiOperation(value = "商品管理-门店特殊售价-删除", tags = {"管理后台"}) |
| | | public R<Void> delete(@ApiParam("id") @RequestParam("id") Integer id) { |
| | | goodsBargainPriceService.removeById(id); |
| | | goodsBargainPriceDetailService.remove(new LambdaQueryWrapper<GoodsBargainPriceDetail>() |
| | |
| | | * 修改 |
| | | */ |
| | | @PutMapping("/edit") |
| | | @ApiOperation(value = "商品管理-门店特殊售价-修改", tags = {"后台管理"}) |
| | | @ApiOperation(value = "商品管理-门店特殊售价-修改", tags = {"管理后台"}) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R<Void> edit(@RequestBody GoodsBargainPrice goodsBargainPrice) { |
| | | goodsBargainPriceService.updateById(goodsBargainPrice); |
| | |
| | | * 详情 |
| | | */ |
| | | @GetMapping("/detail") |
| | | @ApiOperation(value = "商品管理-门店特殊售价-详情", tags = {"后台管理"}) |
| | | @ApiOperation(value = "商品管理-门店特殊售价-详情", tags = {"管理后台"}) |
| | | public R<GoodsBargainPrice> detail(@ApiParam("id") @RequestParam("id") Integer id) { |
| | | GoodsBargainPrice goodsBargainPrice = goodsBargainPriceService.getById(id); |
| | | List<GoodsBargainPriceDetail> goodsBargainPriceDetailList = goodsBargainPriceDetailService.list(new LambdaQueryWrapper<GoodsBargainPriceDetail>() |
| | |
| | | * 列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "商品管理-门店特殊售价-列表", tags = {"后台管理"}) |
| | | @ApiOperation(value = "商品管理-门店特殊售价-列表", tags = {"管理后台"}) |
| | | public R<Page<GoodsBargainPrice>> list(@ApiParam("页码") @RequestParam(value = "pageNum", required = false) Integer pageNum, |
| | | @ApiParam("每页数量") @RequestParam(value = "pageSize", required = false) Integer pageSize, |
| | | @ApiParam("商品id") @RequestParam(value = "goodsId", required = false) Integer goodsId, |
| | |
| | | |
| | | |
| | | @PostMapping("/addGoodsCategory") |
| | | @ApiOperation(value = "添加商品分类", tags = {"管理后台-商品分类"}) |
| | | @ApiOperation(value = "商品管理-商品分类-添加", tags = {"管理后台"}) |
| | | public R<Void> addGoodsCategory(@RequestBody GoodsCategory goodsCategory){ |
| | | goodsCategoryService.save(goodsCategory); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PutMapping("/updateGoodsCategory") |
| | | @ApiOperation(value = "修改商品分类", tags = {"管理后台-商品分类"}) |
| | | @ApiOperation(value = "商品管理-商品分类-修改", tags = {"管理后台"}) |
| | | public R<Void> updateGoodsCategory(@RequestBody GoodsCategory goodsCategory){ |
| | | goodsCategoryService.updateById(goodsCategory); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @GetMapping("/getGoodsCategoryById") |
| | | @ApiOperation(value = "商品分类详情", tags = {"管理后台-商品分类"}) |
| | | @ApiOperation(value = "商品管理-商品分类-详情", tags = {"管理后台"}) |
| | | public R<GoodsCategory> getGoodsCategoryById(@RequestParam("id") Integer id){ |
| | | return R.ok(goodsCategoryService.getById(id)); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getList") |
| | | @ApiOperation(value = "商品分类列表", tags = {"管理后台-商品分类"}) |
| | | @ApiOperation(value = "商品管理-商品分类-列表", tags = {"管理后台"}) |
| | | public R<Page<GoodsCategory>> list(@ApiParam("页码") @RequestParam Integer pageNum,@ApiParam("每一页数据大小") Integer pageSize, GoodsCategory goodsCategory){ |
| | | Page<GoodsCategory> page = goodsCategoryService.lambdaQuery() |
| | | .like(StringUtils.isNotEmpty(goodsCategory.getName()),GoodsCategory::getName, goodsCategory.getName()) |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation(value = "删除商品分类", tags = {"管理后台-商品分类"}) |
| | | @ApiOperation(value = "商品管理-商品分类-删除", tags = {"管理后台"}) |
| | | public R<Void> delete(@RequestParam("id") Integer id){ |
| | | goodsCategoryService.removeById(id); |
| | | return R.ok(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 后台管理商品列表 |
| | | * 管理后台商品列表 |
| | | */ |
| | | @GetMapping("/manageGoodsList") |
| | | @ApiOperation(value = "商品列表", tags = {"管理后台-商品管理"}) |
| | |
| | | * 删除评论 |
| | | */ |
| | | @DeleteMapping("/delete/{id}") |
| | | @ApiOperation(value = "商品管理-评价管理-删除评论-删除评论", tags = {"后台管理"}) |
| | | @ApiOperation(value = "商品管理-评价管理-删除评论-删除评论", tags = {"管理后台"}) |
| | | public R<Void> delete(@PathVariable("id") Long id){ |
| | | goodsEvaluateService.removeById(id); |
| | | return R.ok(); |
| | |
| | | * 评论列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "商品管理-评价管理-评论列表-评论列表", tags = {"后台管理"}) |
| | | @ApiOperation(value = "商品管理-评价管理-评论列表-评论列表", tags = {"管理后台"}) |
| | | public R<List<GoodsEvaluate>> list(GoodsEvaluate goodsEvaluate){ |
| | | List<GoodsEvaluate> list = goodsEvaluateService.lambdaQuery() |
| | | .like(StringUtils.isNotEmpty(goodsEvaluate.getGoodsName()),GoodsEvaluate::getGoodsName, goodsEvaluate.getComment()) |
| | |
| | | * 评论详情 |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation(value = "商品管理-评价管理-评论详情", tags = {"后台管理"}) |
| | | @ApiOperation(value = "商品管理-评价管理-评论详情", tags = {"管理后台"}) |
| | | public R<GoodsEvaluate> getDetail(@PathVariable("id") Long id){ |
| | | GoodsEvaluate goodsEvaluate = goodsEvaluateService.getById(id); |
| | | buildDetail(goodsEvaluate); |
| | |
| | | * 评论上/下架 |
| | | */ |
| | | @PutMapping("/changeStatus") |
| | | @ApiOperation(value = "商品管理-评价管理-评论上/下架", tags = {"后台管理"}) |
| | | @ApiOperation(value = "商品管理-评价管理-评论上/下架", tags = {"管理后台"}) |
| | | public R<Void> changeStatus(@RequestBody GoodsEvaluate goodsEvaluate){ |
| | | goodsEvaluateService.update(new LambdaUpdateWrapper<GoodsEvaluate>() |
| | | .eq(GoodsEvaluate::getId, goodsEvaluate.getId()) |
| | |
| | | * 添加活动 |
| | | */ |
| | | @PostMapping("/save") |
| | | @ApiOperation(value = "活动管理-订单优惠活动-添加活动", tags = {"后台管理"}) |
| | | @ApiOperation(value = "活动管理-订单优惠活动-添加活动", tags = {"管理后台"}) |
| | | public R<Void> saveActivityConfig(@RequestBody OrderActivityInfo orderActivityInfo){ |
| | | orderActivityInfoService.save(orderActivityInfo); |
| | | return R.ok(); |
| | |
| | | * 删除活动 |
| | | */ |
| | | @PostMapping("/delete") |
| | | @ApiOperation(value = "活动管理-订单优惠活动-删除活动", tags = {"后台管理"}) |
| | | @ApiOperation(value = "活动管理-订单优惠活动-删除活动", tags = {"管理后台"}) |
| | | public R<Void> deleteActivityConfig(@RequestParam("id") Long id){ |
| | | orderActivityInfoService.removeById(id); |
| | | return R.ok(); |
| | |
| | | * 修改活动 |
| | | */ |
| | | @PostMapping("/update") |
| | | @ApiOperation(value = "活动管理-订单优惠活动-修改活动", tags = {"后台管理"}) |
| | | @ApiOperation(value = "活动管理-订单优惠活动-修改活动", tags = {"管理后台"}) |
| | | public R<Void> updateActivityConfig(@RequestBody OrderActivityInfo orderActivityInfo){ |
| | | orderActivityInfoService.updateById(orderActivityInfo); |
| | | return R.ok(); |
| | |
| | | * 获取活动列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "活动管理-订单优惠活动-获取活动列表", tags = {"后台管理"}) |
| | | @ApiOperation(value = "活动管理-订单优惠活动-获取活动列表", tags = {"管理后台"}) |
| | | public R<Page<OrderActivityInfo>> list(@ApiParam("页码") @RequestParam Integer pageNum, |
| | | @ApiParam("每一页数据大小") Integer pageSize, |
| | | OrderActivityInfo orderActivityInfo){ |
| | |
| | | * 获取活动详情 |
| | | */ |
| | | @GetMapping("/getDetailById") |
| | | @ApiOperation(value = "活动管理-订单优惠活动-获取活动详情", tags = {"后台管理"}) |
| | | @ApiOperation(value = "活动管理-订单优惠活动-获取活动详情", tags = {"管理后台"}) |
| | | public R<OrderActivityInfo> getDetailById(@RequestParam("id") Long id){ |
| | | return R.ok(orderActivityInfoService.getById(id)); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "广告管理-分享管理-添加", tags = {"后台管理"}) |
| | | @ApiOperation(value = "广告管理-分享管理-添加", tags = {"管理后台"}) |
| | | @PostMapping("/manage/add") |
| | | public R<Void> manage(@RequestBody Share share){ |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "广告管理-分享管理-编辑", tags = {"后台管理"}) |
| | | @ApiOperation(value = "广告管理-分享管理-编辑", tags = {"管理后台"}) |
| | | @PostMapping("/manage/edit") |
| | | public R<Void> manageedit(@RequestBody Share share){ |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "广告管理-分享管理-删除", tags = {"后台管理"}) |
| | | @ApiOperation(value = "广告管理-分享管理-删除", tags = {"管理后台"}) |
| | | @GetMapping("/manage/delete") |
| | | public R<Void> managedelete(@RequestParam Integer id){ |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "广告管理-分享管理-列表", tags = {"后台管理"}) |
| | | @ApiOperation(value = "广告管理-分享管理-列表", tags = {"管理后台"}) |
| | | @GetMapping("/manage/list") |
| | | public R<Page<Share>> managelist(String name,Integer addType,@RequestParam Integer PageNum,Integer pageSize){ |
| | | Page<Share> page = shareService.lambdaQuery().eq(Share::getAuditStatus,1).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageSize, pageSize)); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @ApiOperation(value = "广告管理-分享管理-设为小程序分享", tags = {"后台管理"}) |
| | | @ApiOperation(value = "广告管理-分享管理-设为小程序分享", tags = {"管理后台"}) |
| | | @GetMapping("/manage/set") |
| | | public R<Void> set(@RequestParam Integer id){ |
| | | //将所有分享设为不是小程序分享 |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "广告管理-分享管理-审核列表", tags = {"后台管理"}) |
| | | @ApiOperation(value = "广告管理-分享管理-审核列表", tags = {"管理后台"}) |
| | | @GetMapping("/manage/auth/list") |
| | | public R<Page<Share>> authmanagelist(String name,Integer addType,@RequestParam Integer PageNum,Integer pageSize){ |
| | | Page<Share> page = shareService.lambdaQuery().ne(Share::getAuditStatus,1).like(name != null, Share::getName, name).eq(addType != null, Share::getAddType, addType).page(Page.of(pageSize, pageSize)); |
| | |
| | | |
| | | |
| | | @PostMapping |
| | | @ApiOperation(value = "门店管理-新增门店", tags = {"后台管理"}) |
| | | @ApiOperation(value = "门店管理-新增门店", tags = {"管理后台"}) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R<Void> add(@RequestBody Shop shop){ |
| | | String phone = shop.getPhone(); |
| | |
| | | |
| | | |
| | | @GetMapping("/getDetailById") |
| | | @ApiOperation(value = "门店管理-门店详情", tags = {"后台管理"}) |
| | | @ApiOperation(value = "门店管理-门店详情", tags = {"管理后台"}) |
| | | public R<Shop> getDetailById(@RequestParam("id") Long id){ |
| | | Shop byId = shopService.getById(id); |
| | | return R.ok(byId); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteShop") |
| | | @ApiOperation(value = "门店管理-删除门店", tags = {"后台管理"}) |
| | | @ApiOperation(value = "门店管理-删除门店", tags = {"管理后台"}) |
| | | public R<Void> deleteShop(@ApiParam("门店id") @RequestParam("id") Integer id){ |
| | | shopService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PutMapping("/editShop") |
| | | @ApiOperation(value = "门店管理-编辑门店", tags = {"后台管理"}) |
| | | @ApiOperation(value = "门店管理-编辑门店", tags = {"管理后台"}) |
| | | public R<Void> editShop(@RequestBody Shop shop){ |
| | | shopService.updateById(shop); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | @ApiOperation(value = "门店管理-门店列表", tags = {"后台管理"}) |
| | | @ApiOperation(value = "门店管理-门店列表", tags = {"管理后台"}) |
| | | public R<IPage<Shop>> list(@ApiParam("页码") @RequestParam Integer pageNum,@ApiParam("每一页数据大小") Integer pageSize,Shop shop){ |
| | | IPage<Shop> shopIPage = shopService.getShopList(pageNum, pageSize, shop); |
| | | return R.ok(shopIPage); |
| | |
| | | * 通过手机号校验店长 |
| | | */ |
| | | @PostMapping("/cheUserByPhone") |
| | | @ApiOperation(value = "门店管理-通过手机号校验店长", tags = {"后台管理"}) |
| | | @ApiOperation(value = "门店管理-通过手机号校验店长", tags = {"管理后台"}) |
| | | public R<Boolean> cheUserByPhone(@RequestParam("phone") String phone) { |
| | | return R.ok(shopService.cheUserByPhone(phone)); |
| | | } |
| | |
| | | @Resource |
| | | private SystemConfigService systemConfigService; |
| | | @PostMapping("/index/add") |
| | | @ApiOperation(value = "广告管理-首页配置-添加", tags = {"后台管理"}) |
| | | @ApiOperation(value = "广告管理-首页配置-添加", tags = {"管理后台"}) |
| | | public R add(@RequestBody IndexConfigSetDto indexConfigSetDto){ |
| | | //先删除type=2的数据 |
| | | List<SystemConfig> list = systemConfigService.lambdaQuery().eq(SystemConfig::getType, 2).list(); |
| | |
| | | return R.ok(); |
| | | } |
| | | @GetMapping("/index/detail") |
| | | @ApiOperation(value = "广告管理-首页配置-宣传图片-公司简介", tags = {"后台管理","小程序-首页"}) |
| | | @ApiOperation(value = "广告管理-首页配置-宣传图片-公司简介", tags = {"管理后台","小程序-首页"}) |
| | | public R<IndexConfigSetDto> detail(){ |
| | | SystemConfig one = systemConfigService.lambdaQuery().eq(SystemConfig::getType, 2).one(); |
| | | if (one==null){ |
| | |
| | | } |
| | | |
| | | @PostMapping("/startPage/add") |
| | | @ApiOperation(value = "广告管理-启动页管理-添加", tags = {"后台管理"}) |
| | | @ApiOperation(value = "广告管理-启动页管理-添加", tags = {"管理后台"}) |
| | | public R startPageadd(@RequestBody StartPageSetDto startPageSetDto){ |
| | | //先删除type=1的数据 |
| | | List<SystemConfig> list = systemConfigService.lambdaQuery().eq(SystemConfig::getType, 1).list(); |
| | |
| | | * 订单包邮设置 |
| | | */ |
| | | @PostMapping("/logistics/add") |
| | | @ApiOperation(value = "商品管理-订单包邮设置-添加", tags = {"后台管理"}) |
| | | @ApiOperation(value = "商品管理-订单包邮设置-添加", tags = {"管理后台"}) |
| | | public R add(@RequestBody LogisticsSetDto logisticsSetDto){ |
| | | List<SystemConfig> list = systemConfigService.lambdaQuery().eq(SystemConfig::getType, 3).list(); |
| | | systemConfigService.removeBatchByIds(list); |
| | |
| | | * 获取订单包邮设置 |
| | | */ |
| | | @GetMapping("/logistics/detail") |
| | | @ApiOperation(value = "商品管理-订单包邮设置-订单包邮设置", tags = {"后台管理"}) |
| | | @ApiOperation(value = "商品管理-订单包邮设置-订单包邮设置", tags = {"管理后台"}) |
| | | public R<LogisticsSetDto> logisticsDetail(){ |
| | | SystemConfig one = systemConfigService.lambdaQuery().eq(SystemConfig::getType, 3).one(); |
| | | if (one==null){ |