接口加密,增加食材营养字段,修复食材报错

This commit is contained in:
zjf committed 2026-06-11 13:14:50 +08:00
1 parent d60ce3d8ef
commit 8ffbf70ddb
86 files changed
+468 -63

No files matched your search

@@ -3,6 +3,8 @@ package com.bsd.pjcloud.canteen.dto.erp;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Data
public class CanteenErpMaterialSaveDTO {
@@ -46,4 +48,7 @@ public class CanteenErpMaterialSaveDTO {
@Schema(description="所属分类id")
private Long categoryId;
@Schema(description = "营养元素标签")
private List<CanteenMaterialNutritionTagDTO> nutritionTags;
}
@@ -2,11 +2,14 @@ package com.bsd.pjcloud.canteen.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.bsd.pjcloud.canteen.dto.erp.CanteenMaterialNutritionTagDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.bsd.pjcloud.common.core.util.TenantTable;
import java.time.LocalDateTime;
import java.util.List;
/**
* 原料表
@@ -16,7 +19,7 @@ import java.time.LocalDateTime;
*/
@Data
@TenantTable
@TableName("canteen_erp_material")
@TableName(value = "canteen_erp_material", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@Schema(description = "原料表")
public class CanteenErpMaterialEntity extends Model<CanteenErpMaterialEntity> {
@@ -106,4 +109,8 @@ public class CanteenErpMaterialEntity extends Model<CanteenErpMaterialEntity> {
@Schema(description="所属分类id")
private Long categoryId;
@Schema(description = "营养元素标签")
@TableField(typeHandler = JacksonTypeHandler.class)
private List<CanteenMaterialNutritionTagDTO> nutritionTags;
}
@@ -1,8 +1,11 @@
package com.bsd.pjcloud.canteen.vo.erp;
import com.bsd.pjcloud.canteen.dto.erp.CanteenMaterialNutritionTagDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.List;
@Data
public class CanteenErpMaterialVO {
@@ -52,4 +55,7 @@ public class CanteenErpMaterialVO {
@Schema(description="所属分类id")
private Long categoryId;
@Schema(description = "营养元素标签")
private List<CanteenMaterialNutritionTagDTO> nutritionTags;
}
@@ -13,6 +13,10 @@
<artifactId>pjcloud-canteen-biz</artifactId>
<dependencies>
<dependency>
<groupId>com.bsd</groupId>
<artifactId>pjcloud-common-encrypt-api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.canteen.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -134,6 +135,7 @@ public class BoxesBookingController {
return boxesBookingService.list(Wrappers.lambdaQuery(boxesBooking).in(ArrayUtil.isNotEmpty(ids), BoxesBookingEntity::getId, ids));
}
@ApiCryptoAes
@PostMapping("/create")
@Operation(summary = "新增预约")
@Transactional
@@ -200,4 +202,4 @@ public class BoxesBookingController {
// batchAvaliabilityJob.avaliabilityJobHandler();
return R.ok();
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.canteen.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
@@ -138,6 +139,7 @@ public class BoxesInfoController {
}
// --------------------移动端接口---------------------------
@ApiCryptoAes
@GetMapping("/getInfo")
@Operation(summary = "获得餐桌固定的基础信息")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@@ -148,6 +150,7 @@ public class BoxesInfoController {
return R.ok(appBXInfoRespVO);
}
@ApiCryptoAes
@GetMapping("/get")
@Operation(summary = "根据日期动态获取餐桌可预约时间信息")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@@ -157,6 +160,7 @@ public class BoxesInfoController {
return R.ok(info);
}
@ApiCryptoAes
@GetMapping("/appPage")
@Operation(summary = "获得餐桌信息分页")
public R getInfoPage(@ParameterObject Page page, @ParameterObject BoxesInfoEntity boxesInfo) {
@@ -205,9 +209,10 @@ public class BoxesInfoController {
return R.ok(resultPage);
}
@ApiCryptoAes
@PostMapping("/createBooking")
@Operation(summary = "创建餐桌预约")
public R<Long> createBooking(@RequestBody AppMakeSaveReqVO createReqVO) {
return boxesBookingService.createBooking(createReqVO);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.canteen.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -205,6 +206,7 @@ public class CanteenDailyMenuController {
* 获取分页菜品
*/
@Operation(summary = "分页查询", description = "分页查询")
@ApiCryptoAes
@PostMapping("/app/page")
public R<Page> selectTimeFoodPage(@ParameterObject Page page, @RequestBody @Validated DailyMenuDTO dailyMenuDTO) {
return R.ok(canteenDailyMenuService.selectTimeFoodPage(page, dailyMenuDTO));
@@ -214,6 +216,7 @@ public class CanteenDailyMenuController {
/**
* 获取当天指定菜品
*/
@ApiCryptoAes
@GetMapping("/app/selectTimeFood")
public R<List<DailyMenuAll>> selectTimeFoodAPP(@RequestParam("time") String time,
@RequestParam("merchantId") Long merchantId,
@@ -226,4 +229,4 @@ public class CanteenDailyMenuController {
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.canteen.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.bsd.pjcloud.canteen.dto.delivery.CanteenDeliveryOrderSyncDTO;
import com.bsd.pjcloud.canteen.dto.delivery.CanteenDeliveryPhotoDTO;
@@ -102,6 +103,7 @@ public class CanteenDeliveryOrderController {
return canteenDeliveryOrderService.cancelBySourceOrderId(sourceOrderId);
}
@ApiCryptoAes
@GetMapping("/app/list")
@Operation(summary = "骑手端-我的配送单",
description = "tab: pending待配送 | all全部 | completed已完成 | cancelled已取消。分页参数与 MyBatis-Plus Page 一致:current(页码,默认1)、size(每页条数,默认10,最大100)。")
@@ -111,6 +113,7 @@ public class CanteenDeliveryOrderController {
return R.ok(canteenDeliveryOrderService.pageForRider(uid, tab, page));
}
@ApiCryptoAes
@GetMapping("/app/commission/summary")
@Operation(summary = "骑手端-佣金汇总", description = "今日/本月佣金合计(分),按派单时间统计,已取消单不计入")
public R<CanteenDeliveryRiderCommissionSummaryVO> appCommissionSummary() {
@@ -118,6 +121,7 @@ public class CanteenDeliveryOrderController {
return R.ok(canteenDeliveryOrderService.commissionSummaryForRider(uid));
}
@ApiCryptoAes
@GetMapping("/app/commission/query")
@Operation(summary = "骑手端-自定义日期佣金", description = "startDate/endDate 格式 yyyy-MM-dd,含首尾自然日")
public R<CanteenDeliveryRiderCommissionQueryVO> appCommissionQuery(
@@ -135,6 +139,7 @@ public class CanteenDeliveryOrderController {
}
}
@ApiCryptoAes
@GetMapping("/app/{id}")
@Operation(summary = "骑手端-配送单详情")
public R<CanteenDeliveryOrderAppVO> appDetail(@PathVariable Long id) {
@@ -146,6 +151,7 @@ public class CanteenDeliveryOrderController {
return R.ok(vo);
}
@ApiCryptoAes
@GetMapping("/app/mch/list")
@Operation(summary = "商家端 App-外送单列表",
description = "tab: wait_accept待接单 | accepted已接单 | cancelled | completed | all | pending(兼容)")
@@ -154,24 +160,28 @@ public class CanteenDeliveryOrderController {
return canteenDeliveryOrderService.pageForMerchantApp(tab, page);
}
@ApiCryptoAes
@GetMapping("/app/mch/stats/summary")
@Operation(summary = "商家端-订单统计汇总")
public R<CanteenDeliveryMerchantStatsSummaryVO> mchStatsSummary() {
return canteenDeliveryOrderService.merchantStatsSummary();
}
@ApiCryptoAes
@GetMapping("/app/mch/stats/month")
@Operation(summary = "商家端-按月统计", description = "month 格式 yyyy-MM")
public R<CanteenDeliveryMerchantStatsMonthVO> mchStatsMonth(@RequestParam String month) {
return canteenDeliveryOrderService.merchantStatsByMonth(month);
}
@ApiCryptoAes
@GetMapping("/app/mch/auto-accept")
@Operation(summary = "商家端-获取自动接单配置")
public R<CanteenDeliveryAutoAcceptVO> mchGetAutoAccept() {
return canteenDeliveryOrderService.getMerchantAutoAccept();
}
@ApiCryptoAes
@PutMapping("/app/mch/auto-accept")
@Operation(summary = "商家端-保存自动接单配置")
public R<CanteenDeliveryAutoAcceptVO> mchSaveAutoAccept(@RequestParam Boolean autoAccept) {
@@ -179,12 +189,14 @@ public class CanteenDeliveryOrderController {
}
@SysLog("商家接单")
@ApiCryptoAes
@PostMapping("/app/mch/accept/{id}")
@Operation(summary = "商家端-手动接单")
public R<Void> mchAccept(@PathVariable Long id) {
return canteenDeliveryOrderService.merchantAcceptOrder(id);
}
@ApiCryptoAes
@GetMapping("/app/mch/{id}")
@Operation(summary = "商家端 App-外送单详情",
description = "预约单未到商家通知完成前返回失败(与列表可见性一致)。")
@@ -192,6 +204,7 @@ public class CanteenDeliveryOrderController {
return canteenDeliveryOrderService.detailForMerchantApp(id);
}
@ApiCryptoAes
@GetMapping("/app/rider/auto-accept")
@Operation(summary = "骑手端-获取自动接单配置")
public R<CanteenDeliveryAutoAcceptVO> riderGetAutoAccept() {
@@ -199,6 +212,7 @@ public class CanteenDeliveryOrderController {
return canteenDeliveryOrderService.getRiderAutoAccept(uid);
}
@ApiCryptoAes
@PutMapping("/app/rider/auto-accept")
@Operation(summary = "骑手端-保存自动接单配置")
public R<CanteenDeliveryAutoAcceptVO> riderSaveAutoAccept(@RequestParam Boolean autoAccept) {
@@ -207,6 +221,7 @@ public class CanteenDeliveryOrderController {
}
@SysLog("骑手接单")
@ApiCryptoAes
@PostMapping("/app/accept/{id}")
@Operation(summary = "骑手端-手动接单")
public R<Void> riderAccept(@PathVariable Long id) {
@@ -215,6 +230,7 @@ public class CanteenDeliveryOrderController {
}
@SysLog("取餐拍照")
@ApiCryptoAes
@PostMapping("/app/pickup")
@Operation(summary = "骑手端-到店取餐拍照",
description = "本地状态改为配送中后,会 Feign 调用硬件服务 POST /hard-order/update-take-out-status,status=TAKE_OUT_ING(sourceOrderId 即硬件订单 id)。")
@@ -223,6 +239,7 @@ public class CanteenDeliveryOrderController {
}
@SysLog("送达拍照")
@ApiCryptoAes
@PostMapping("/app/deliver")
@Operation(summary = "骑手端-送达拍照",
description = "本地状态改为已完成后,会 Feign 调用硬件服务 POST /hard-order/update-take-out-status,status=DONE。")
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.canteen.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -72,6 +73,7 @@ public class CanteenOnlineCategoryController {
*/
@Operation(summary = "新增在线点餐分类" , description = "新增在线点餐分类" )
@SysLog("新增在线点餐分类" )
@ApiCryptoAes
@PostMapping
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineCategory_add')" )
public R save(@RequestBody CanteenOnlineCategoryEntity dto) {
@@ -83,6 +85,7 @@ public class CanteenOnlineCategoryController {
*/
@Operation(summary = "修改在线点餐分类" , description = "修改在线点餐分类" )
@SysLog("修改在线点餐分类" )
@ApiCryptoAes
@PutMapping
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineCategory_edit')" )
public R updateById(@RequestBody CanteenOnlineCategoryEntity dto) {
@@ -96,6 +99,7 @@ public class CanteenOnlineCategoryController {
*/
@Operation(summary = "通过id删除在线点餐分类" , description = "通过id删除在线点餐分类" )
@SysLog("通过id删除在线点餐分类" )
@ApiCryptoAes
@DeleteMapping
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineCategory_del')" )
public R removeById(@RequestBody Long[] ids) {
@@ -140,6 +144,7 @@ public class CanteenOnlineCategoryController {
* @return R
*/
@Operation(summary = "查询线上菜品分类,根据商户id" , description = "通过商户id查询" )
@ApiCryptoAes
@GetMapping("/app/getAllSimple")
public R getAllSimple(@RequestParam(value = "merchantId")Long merchantId) {
LambdaQueryWrapper<CanteenOnlineCategoryEntity> wrapper = Wrappers.lambdaQuery();
@@ -149,4 +154,4 @@ public class CanteenOnlineCategoryController {
List<CanteenOnlineCategoryEntity> list = canteenOnlineCategoryService.list(wrapper);
return R.ok(list);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.canteen.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -130,6 +131,7 @@ public class CanteenOnlineSpuController {
*/
@Operation(summary = "新增在线点餐spu", description = "新增在线点餐spu")
@SysLog("新增在线点餐spu")
@ApiCryptoAes
@PostMapping
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineSpu_add')")
public R save(@RequestBody CanteenOnlineSpuEntity canteenOnlineSpu) {
@@ -145,6 +147,7 @@ public class CanteenOnlineSpuController {
@Operation(summary = "批量新增关联每日菜谱", description = "批量新增关联每日菜谱")
@SysLog("批量导入新增点餐spu")
@ApiCryptoAes
@PostMapping("/saveCanteenSpuBatch")
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineSpu_add')")
public R saveCanteenSpuBatch(@RequestBody CanteenOnlineSpuSaveDto canteenOnlineSpuSaveDto) {
@@ -159,6 +162,7 @@ public class CanteenOnlineSpuController {
*/
@Operation(summary = "修改在线点餐spu", description = "修改在线点餐spu")
@SysLog("修改在线点餐spu")
@ApiCryptoAes
@PutMapping
@PreAuthorize("@pms.hasPermission('canteen_canteenOnlineSpu_edit')")
public R updateById(@RequestBody CanteenOnlineSpuEntity canteenOnlineSpu) {
@@ -206,6 +210,7 @@ public class CanteenOnlineSpuController {
/**
* 通过单位(部门)查询商户简洁信息(用于移动端展示门店信息)
*/
@ApiCryptoAes
@GetMapping("/app/getMerchantSimpleByDeptId")
@Operation(summary = "通过部门ID查询商户简洁信息", description = "返回商户id/名称/logo/营业时间/手机号/是否对外营业")
public R<MchSimpleAppVO> getMerchantSimpleByDeptId() {
@@ -236,6 +241,7 @@ public class CanteenOnlineSpuController {
* @param stockFilter in_stock 仅非售罄,sold_out 仅售罄,不传不限
* @param priceOrder 按价格排序:asc 升序 desc 降序,不传则按 sort、id
*/
@ApiCryptoAes
@GetMapping("/app/getCanteenSpuList")
@Operation(summary = "获取在线点餐的菜品列表", description = "商户 id 必传;返回含 status、requiredChoice、choiceGroupId+choiceGroup(择一/组合规则)、soldOut")
public R<List<APPOnlineSpuVO>> getCanteenSpuList(
@@ -253,6 +259,7 @@ public class CanteenOnlineSpuController {
}
@ApiCryptoAes
@GetMapping("/app/getCanteenSpuDetails")
@Operation(summary = "获取详情接口", description = "通过spu的id")
public R<APPOnlineSpuVO> getCanteenSpuDetails(@RequestParam(value = "id") Long id) {
@@ -267,6 +274,7 @@ public class CanteenOnlineSpuController {
return R.ok(bean);
}
@ApiCryptoAes
@GetMapping("/app/getChoiceGroups")
@Operation(summary = "下单前获取分组规则(聚合)",
description = "按 choiceGroupId 聚合组内 SPU 列表;并返回 requiredChoice=1 且未进组的单品必选列表。")
@@ -348,6 +356,7 @@ public class CanteenOnlineSpuController {
}
@ApiCryptoAes
@GetMapping("/app/checkSpuStock")
@SysLog("购物车效验库存")
@Transactional
@@ -366,6 +375,7 @@ public class CanteenOnlineSpuController {
/**
* 下单/支付等场景扣减库存,会与销量 sales_count 联动,请勿用于商家手工改库存。
*/
@ApiCryptoAes
@PostMapping("/app/updateSkuStock")
@SysLog("更新菜品库存(订单联动销量)")
@Transactional
@@ -376,6 +386,7 @@ public class CanteenOnlineSpuController {
/**
* 商家端手工增减库存(只更新 stock,不修改销量);仅允许操作当前登录单位对应食堂商户下的 SPU。
*/
@ApiCryptoAes
@PostMapping("/app/adjustStock")
@Operation(summary = "商家调整菜品库存", description = "正数增加、负数减少;不联动销量,与下单接口 /app/updateSkuStock 区分")
@SysLog("商家调整菜品库存")
@@ -389,6 +400,7 @@ public class CanteenOnlineSpuController {
return canteenOnlineSpuService.adjustOnlineSpuStockManual(resp.getData().getId(), canteenOnlineSpuUpdateStockReqDTO);
}
@ApiCryptoAes
@PostMapping("/app/updateShelfStatus")
@Operation(summary = "商家上架/下架菜品", description = "status:0-上架(默认),1-下架;仅可操作当前单位对应食堂商户下的 SPU")
@SysLog("商家上架下架菜品")
@@ -409,6 +421,7 @@ public class CanteenOnlineSpuController {
* @return R
*/
@Operation(summary = "通过ids查询", description = "通过ids查询")
@ApiCryptoAes
@PostMapping("/app/getSpuListByIds")
// @PreAuthorize("@pms.hasPermission('canteen_canteenSpu_view')")
public R<List<CanteenOnlineSpuAppVO>> getByIds(@RequestBody List<Long> ids) {
@@ -420,4 +433,4 @@ public class CanteenOnlineSpuController {
return R.ok(canteenOnlineSpuAppVOS);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.canteen.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.admin.api.entity.SysDept;
@@ -41,12 +42,14 @@ public class CanteenOrderingFoodController {
private final CanteenOrderingFoodService canteenOrderingFoodService;
@ApiCryptoAes
@GetMapping("/app/meal-segments")
@Operation(summary = "报餐餐段列表", description = "根据商户营业时间 jobTime 解析餐段(早餐/午餐/晚餐/宵夜)")
public R<List<OrderingFoodMealSegmentVO>> mealSegments(@RequestParam String merchantId) {
return canteenOrderingFoodService.listMealSegments(merchantId);
}
@ApiCryptoAes
@GetMapping("/app/next-seven-days")
@Operation(summary = "可报餐日期", description = "从今天起连续7天 yyyy-MM-dd")
public R<List<String>> nextSevenDays() {
@@ -54,12 +57,14 @@ public class CanteenOrderingFoodController {
}
@SysLog("提交报餐")
@ApiCryptoAes
@PostMapping("/app/submit")
@Operation(summary = "提交报餐", description = "支持批量选择未来7天内多个日期餐段")
public R<Integer> submit(@Valid @RequestBody OrderingFoodSubmitDTO dto) {
return canteenOrderingFoodService.submit(dto);
}
@ApiCryptoAes
@GetMapping("/app/my/page")
@Operation(summary = "我的报餐记录", description = "分页:current、size;可选 startDate、endDate")
public R<Page<OrderingFoodAppVO>> myPage(
@@ -69,6 +74,7 @@ public class CanteenOrderingFoodController {
return canteenOrderingFoodService.pageMyRecords(startDate, endDate, page);
}
@ApiCryptoAes
@GetMapping("/app/my/{id}")
@Operation(summary = "我的报餐详情")
public R<OrderingFoodAppVO> myDetail(@PathVariable Long id) {
@@ -76,12 +82,14 @@ public class CanteenOrderingFoodController {
}
@SysLog("取消报餐")
@ApiCryptoAes
@PostMapping("/app/my/cancel/{id}")
@Operation(summary = "取消报餐")
public R<Void> cancel(@PathVariable Long id) {
return canteenOrderingFoodService.cancelMyRecord(id);
}
@ApiCryptoAes
@GetMapping("/app/mch/stats")
@Operation(summary = "商户报餐统计", description = "仅商户角色;按日汇总各餐段报餐人数")
public R<OrderingFoodStatsSummaryVO> mchStats(
@@ -108,6 +116,7 @@ public class CanteenOrderingFoodController {
return canteenOrderingFoodService.exportStatsForMerchant(merchantId, startDate, endDate, deptId, userId);
}
@ApiCryptoAes
@GetMapping("/app/mch/stats/detail")
@Operation(summary = "商户报餐统计-某日详情", description = "按餐段汇总人数与菜品份数;segmentIndex 可选,仅查看某一餐段")
public R<OrderingFoodStatsDayDetailVO> mchStatsDetail(
@@ -134,12 +143,14 @@ public class CanteenOrderingFoodController {
return canteenOrderingFoodService.exportStatsDayDetailForMerchant(merchantId, diningDate, deptId, userId, segmentIndex);
}
@ApiCryptoAes
@GetMapping("/app/mch/filter-depts")
@Operation(summary = "统计筛选-部门列表")
public R<List<SysDept>> filterDepts() {
return canteenOrderingFoodService.filterDeptsForMerchant();
}
@ApiCryptoAes
@GetMapping("/app/mch/filter-users")
@Operation(summary = "统计筛选-员工列表", description = "deptId 为空时取当前用户部门及下级全部用户")
public R<List<SysUser>> filterUsers(@RequestParam(required = false) Long deptId) {
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.canteen.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -251,6 +252,7 @@ public class CanteenSpuController {
}
@ApiCryptoAes
@GetMapping("/app/checkSpuStock")
@SysLog("购物车效验库存")
@Transactional
@@ -267,4 +269,4 @@ public class CanteenSpuController {
}
}
@@ -48,6 +48,7 @@ public class CanteenErpMaterialServiceImpl extends ServiceImpl<CanteenErpMateria
canteenErpMaterialEntity.setDeptId(deptId);
canteenErpMaterialEntity.setPurchasePrice(canteenErpMaterialSaveDTO.getPurchasePrice());
canteenErpMaterialEntity.setCategoryId(canteenErpMaterialSaveDTO.getCategoryId());
canteenErpMaterialEntity.setNutritionTags(canteenErpMaterialSaveDTO.getNutritionTags());
int insert = baseMapper.insert(canteenErpMaterialEntity);
// 线上食材(materialType=2)仅作转换规则,不建库存
int materialType = canteenErpMaterialEntity.getMaterialType() != null ? canteenErpMaterialEntity.getMaterialType() : 1;
@@ -75,6 +76,7 @@ public class CanteenErpMaterialServiceImpl extends ServiceImpl<CanteenErpMateria
canteenErpMaterialEntity.setMaterialType(canteenErpMaterialEditorDTO.getMaterialType() != null ? canteenErpMaterialEditorDTO.getMaterialType() : 1);
canteenErpMaterialEntity.setPurchasePrice(canteenErpMaterialEditorDTO.getPurchasePrice());
canteenErpMaterialEntity.setCategoryId(canteenErpMaterialEditorDTO.getCategoryId());
canteenErpMaterialEntity.setNutritionTags(canteenErpMaterialEditorDTO.getNutritionTags());
int i = baseMapper.updateById(canteenErpMaterialEntity);
// 线上食材(materialType=2)无库存,不更新
@@ -113,6 +115,7 @@ public class CanteenErpMaterialServiceImpl extends ServiceImpl<CanteenErpMateria
canteenErpMaterialVO.setPurchasePrice(canteenErpMaterialEntity.getPurchasePrice());
canteenErpMaterialVO.setCategoryId(canteenErpMaterialEntity.getCategoryId());
canteenErpMaterialVO.setMaterialType(canteenErpMaterialEntity.getMaterialType());
canteenErpMaterialVO.setNutritionTags(canteenErpMaterialEntity.getNutritionTags());
// 线上食材无库存,仅线下查询库存
int materialType = canteenErpMaterialEntity.getMaterialType() != null ? canteenErpMaterialEntity.getMaterialType() : 1;
if (materialType == 1) {
@@ -17,14 +17,34 @@
<result property="tenantId" column="tenant_id"/>
<result property="purchasePrice" column="purchase_price"/>
<result property="categoryId" column="category_id"/>
<result property="nutritionTags" column="nutrition_tags"
typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
</resultMap>
<select id="selectPageDataByScope" resultType="com.bsd.pjcloud.canteen.vo.erp.CanteenErpMaterialVO">
<resultMap id="canteenErpMaterialVoMap" type="com.bsd.pjcloud.canteen.vo.erp.CanteenErpMaterialVO">
<id property="id" column="id"/>
<result property="name" column="name"/>
<result property="unit" column="unit"/>
<result property="materialType" column="materialType"/>
<result property="categoryId" column="category_id"/>
<result property="purchasePrice" column="purchase_price"/>
<result property="baseStock" column="baseStock"/>
<result property="inventoryUpperLimit" column="inventoryUpperLimit"/>
<result property="inventoryLowerLimit" column="inventoryLowerLimit"/>
<result property="currentStock" column="currentStock"/>
<result property="nutritionTags" column="nutritionTags"
typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
</resultMap>
<select id="selectPageDataByScope" resultMap="canteenErpMaterialVoMap">
SELECT
m.id,
m.name,
m.unit,
m.dept_id,
m.material_type AS materialType,
m.category_id,
m.nutrition_tags AS nutritionTags,
m.purchase_price,
s.base_stock AS baseStock,
s.inventory_upper_limit AS inventoryUpperLimit,
@@ -1,9 +1,7 @@
package com.bsd.pjcloud.common.api.encrypt.core;
import cn.hutool.core.annotation.AnnotationUtil;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.bsd.pjcloud.common.api.encrypt.annotation.decrypt.ApiDecrypt;
import com.bsd.pjcloud.common.api.encrypt.bean.CryptoInfoBean;
import com.bsd.pjcloud.common.api.encrypt.bean.DecryptHttpInputMessage;
import com.bsd.pjcloud.common.api.encrypt.config.ApiEncryptProperties;
@@ -51,7 +49,7 @@ public class ApiDecryptRequestBodyAdvice implements RequestBodyAdvice {
@Override
public boolean supports(MethodParameter methodParameter, Type targetType,
Class<? extends HttpMessageConverter<?>> converterType) {
return AnnotationUtil.hasAnnotation(methodParameter.getMethod(), ApiDecrypt.class);
return ApiCryptoUtil.supportsDecrypt(methodParameter);
}
@Override
@@ -69,6 +67,10 @@ public class ApiDecryptRequestBodyAdvice implements RequestBodyAdvice {
return inputMessage;
}
if (!ApiCryptoUtil.hasEncFlag(ApiCryptoUtil.currentRequest())) {
return inputMessage;
}
CryptoInfoBean cryptoInfoBean = ApiCryptoUtil.getDecryptInfo(parameter);
if (cryptoInfoBean == null) {
throw new DecryptBodyFailException("获取解密注解配置为空");
@@ -1,10 +1,8 @@
package com.bsd.pjcloud.common.api.encrypt.core;
import cn.hutool.core.annotation.AnnotationUtil;
import cn.hutool.core.util.StrUtil;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.bsd.pjcloud.common.api.encrypt.annotation.encrypt.ApiEncrypt;
import com.bsd.pjcloud.common.api.encrypt.bean.CryptoInfoBean;
import com.bsd.pjcloud.common.api.encrypt.config.ApiEncryptProperties;
import com.bsd.pjcloud.common.api.encrypt.exception.EncryptBodyFailException;
@@ -48,7 +46,7 @@ public class ApiEncryptResponseBodyAdvice implements ResponseBodyAdvice<Object>
@Override
public boolean supports(MethodParameter returnType, Class converterType) {
return AnnotationUtil.hasAnnotation(returnType.getMethod(), ApiEncrypt.class);
return ApiCryptoUtil.supportsEncrypt(returnType);
}
@Nullable
@@ -59,6 +57,10 @@ public class ApiEncryptResponseBodyAdvice implements ResponseBodyAdvice<Object>
return null;
}
if (!ApiCryptoUtil.hasEncFlag(ApiCryptoUtil.currentRequest())) {
return body;
}
CryptoInfoBean cryptoInfoBean = ApiCryptoUtil.getEncryptInfo(returnType);
if (cryptoInfoBean == null) {
throw new EncryptBodyFailException();
@@ -22,7 +22,10 @@ import org.springframework.core.MethodParameter;
import org.springframework.core.annotation.AnnotatedElementUtils;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import jakarta.servlet.http.HttpServletRequest;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.nio.charset.Charset;
@@ -40,6 +43,59 @@ import java.nio.charset.StandardCharsets;
@UtilityClass
public class ApiCryptoUtil {
public static final String ENC_FLAG_HEADER = "Enc-Flag";
/**
* 请求头 Enc-Flag 为 true 时执行加解密(与 PC/App 前端约定一致)
*/
public static boolean hasEncFlag(@Nullable HttpServletRequest request) {
if (request == null) {
return false;
}
String encFlag = request.getHeader(ENC_FLAG_HEADER);
return StrUtil.isNotBlank(encFlag) && !StrUtil.equalsIgnoreCase(encFlag, "false");
}
@Nullable
private static ApiEncrypt findApiEncrypt(MethodParameter methodParameter) {
ApiEncrypt encryptBody = AnnotatedElementUtils.findMergedAnnotation(methodParameter.getMethod(),
ApiEncrypt.class);
if (encryptBody != null) {
return encryptBody;
}
if (methodParameter.getContainingClass() != null) {
return AnnotatedElementUtils.findMergedAnnotation(methodParameter.getContainingClass(), ApiEncrypt.class);
}
return null;
}
@Nullable
private static ApiDecrypt findApiDecrypt(MethodParameter methodParameter) {
ApiDecrypt decryptBody = AnnotatedElementUtils.findMergedAnnotation(methodParameter.getMethod(),
ApiDecrypt.class);
if (decryptBody != null) {
return decryptBody;
}
if (methodParameter.getContainingClass() != null) {
return AnnotatedElementUtils.findMergedAnnotation(methodParameter.getContainingClass(), ApiDecrypt.class);
}
return null;
}
public static boolean supportsEncrypt(MethodParameter methodParameter) {
return findApiEncrypt(methodParameter) != null;
}
public static boolean supportsDecrypt(MethodParameter methodParameter) {
return findApiDecrypt(methodParameter) != null;
}
@Nullable
public static HttpServletRequest currentRequest() {
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
return attributes != null ? attributes.getRequest() : null;
}
/**
* 获取方法控制器上的加密注解信息
* @param methodParameter 控制器方法
@@ -47,8 +103,7 @@ public class ApiCryptoUtil {
*/
@Nullable
public static CryptoInfoBean getEncryptInfo(MethodParameter methodParameter) {
ApiEncrypt encryptBody = AnnotatedElementUtils.findMergedAnnotation(methodParameter.getMethod(),
ApiEncrypt.class);
ApiEncrypt encryptBody = findApiEncrypt(methodParameter);
if (encryptBody == null) {
return null;
}
@@ -62,8 +117,7 @@ public class ApiCryptoUtil {
*/
@Nullable
public static CryptoInfoBean getDecryptInfo(MethodParameter methodParameter) {
ApiDecrypt decryptBody = AnnotatedElementUtils.findMergedAnnotation(methodParameter.getMethod(),
ApiDecrypt.class);
ApiDecrypt decryptBody = findApiDecrypt(methodParameter);
if (decryptBody == null) {
return null;
}
@@ -13,6 +13,10 @@
<artifactId>pjcloud-hardware-biz</artifactId>
<dependencies>
<dependency>
<groupId>com.bsd</groupId>
<artifactId>pjcloud-common-encrypt-api</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>lock4j-redis-template-spring-boot-starter</artifactId>
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -40,6 +41,7 @@ public class HardApptController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app预约时间列表", description = "app预约时间列表")
@ApiCryptoAes
@GetMapping("/app/list")
public R<List<HardApptEntity>> appList(@ParameterObject HardApptDto dto) {
List<HardApptEntity> list = hardApptService.list(new LambdaQueryWrapper<HardApptEntity>()
@@ -97,4 +99,4 @@ public class HardApptController {
public List<HardApptEntity> export(HardApptEntity hardAppt, Long[] ids) {
return hardApptService.list(Wrappers.lambdaQuery(hardAppt).in(ArrayUtil.isNotEmpty(ids), HardApptEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -46,6 +47,7 @@ public class HardAuthController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app获取智能柜授权信息", description = "app获取智能柜授权信息")
@ApiCryptoAes
@PostMapping("/app/get-auth-hard-door")
public R<HardGetAuthAppVo> appGetAuthHardDoor(@Valid @RequestBody HardGetAuthAppDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -55,6 +57,7 @@ public class HardAuthController {
}
@Operation(summary = "app智能柜授权", description = "app智能柜授权")
@ApiCryptoAes
@PostMapping("/app/auth-hard-door")
public R<Long> appAuthHardDoor(@Valid @RequestBody HardAuthAppDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -64,6 +67,7 @@ public class HardAuthController {
}
@Operation(summary = "app创建第三方免密支付", description = "app创建第三方免密支付")
@ApiCryptoAes
@PostMapping("/app/auth-create-third-door-order")
public R<HardAppCreateThirdDoorOrderVo> appCreateThirdDoorOrder(@Valid @RequestBody HardAuthAppDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -73,6 +77,7 @@ public class HardAuthController {
}
@Operation(summary = "app创建第三方免密开门", description = "app创建第三方免密开门")
@ApiCryptoAes
@PostMapping("/app/third-door-open")
public R<Long> appThirdDoorOpen(@Valid @RequestBody HardAppThirdOpenDoorDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -137,4 +142,4 @@ public class HardAuthController {
public List<HardAuthEntity> export(HardAuthEntity hardAuth, Long[] ids) {
return hardAuthService.list(Wrappers.lambdaQuery(hardAuth).in(ArrayUtil.isNotEmpty(ids), HardAuthEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -90,6 +91,7 @@ public class HardDoorFlowController {
/* ************************************* start app start ************************************* */
@Operation(summary = "上架开门", description = "上架开门")
@ApiCryptoAes
@PostMapping("/app/open-repertory")
@Idempotent(expireTime = 5, info = "正在开门中,请勿重复操作")
public R<Long> openRepertory(@Validated @RequestBody HardDoorFlowOpenDto dto) {
@@ -101,6 +103,7 @@ public class HardDoorFlowController {
}
@Operation(summary = "app检修开门", description = "app检修开门")
@ApiCryptoAes
@PostMapping("/app/open-access")
@Idempotent(expireTime = 5, info = "正在开门中,请勿重复操作")
public R appOpenAccess(@Validated @RequestBody HardDoorFlowOpenDto dto) {
@@ -113,6 +116,7 @@ public class HardDoorFlowController {
}
@Operation(summary = "app检修开门", description = "app检修开门")
@ApiCryptoAes
@PostMapping("/app/close-access")
@Idempotent(expireTime = 5, info = "正在关门中,请勿重复操作")
public R appCloseAccess(@Validated @RequestBody HardDoorFlowOpenDto dto) {
@@ -205,4 +209,4 @@ public class HardDoorFlowController {
public List<HardDoorFlowEntity> export(HardDoorFlowEntity hardDoorFlow, Long[] ids) {
return hardDoorFlowService.list(Wrappers.lambdaQuery(hardDoorFlow).in(ArrayUtil.isNotEmpty(ids), HardDoorFlowEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller.address;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -40,6 +41,7 @@ public class HardUserMapAddressController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app分页查询", description = "app分页查询")
@ApiCryptoAes
@GetMapping("/app/page")
public R<Page<HardUserMapAddressVo>> appPageList(@ParameterObject Page page, @ParameterObject HardUserMapAddressDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -48,6 +50,7 @@ public class HardUserMapAddressController {
}
@Operation(summary = "app新增地址", description = "app新增地址")
@ApiCryptoAes
@PostMapping("/app/create")
public R<Long> appCreate(@ParameterObject HardUserMapAddressDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -56,6 +59,7 @@ public class HardUserMapAddressController {
}
@Operation(summary = "app修改地址", description = "app修改地址")
@ApiCryptoAes
@PostMapping("/app/edit")
public R<Long> appEdit(@ParameterObject HardUserMapAddressDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -64,6 +68,7 @@ public class HardUserMapAddressController {
}
@Operation(summary = "app删除地址", description = "app删除地址")
@ApiCryptoAes
@DeleteMapping("/app/del")
public R<Long> appDel(@RequestBody Long id) {
PjcloudUser user = SecurityUtils.getUser();
@@ -134,4 +139,4 @@ public class HardUserMapAddressController {
public List<HardUserMapAddressEntity> export(HardUserMapAddressEntity hardUserMapAddress, Long[] ids) {
return hardUserMapAddressService.list(Wrappers.lambdaQuery(hardUserMapAddress).in(ArrayUtil.isNotEmpty(ids), HardUserMapAddressEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller.hard;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ObjectUtil;
import com.bsd.pjcloud.common.core.util.R;
@@ -36,6 +37,7 @@ import java.util.List;
@RequestMapping("/hard-api/ad")
@Tag(description = "hard-api", name = "硬件")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
@ApiCryptoAes
public class HardApiController {
private final HardManagerService hardManagerService;
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller.manager;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -47,6 +48,7 @@ public class HardDoorManagerController {
/* ************************************* start APP start ************************************* */
@Operation(summary = "app查询智能柜列表", description = "app查询智能柜列表")
@ApiCryptoAes
@GetMapping("/app/page")
public R<Page<HardDoorManagerVo>> appPage(@ParameterObject Page page, @ParameterObject HardDoorManagerDto dto) {
DataScope dataScope = null;
@@ -54,6 +56,7 @@ public class HardDoorManagerController {
}
@Operation(summary = "app查询智能柜详情", description = "app查询智能柜详情")
@ApiCryptoAes
@GetMapping("/app/detail")
public R appDetail(@RequestParam Long hardDoorId) {
return R.ok(hardDoorManagerService.getByHardDoorId(hardDoorId));
@@ -133,4 +136,4 @@ public class HardDoorManagerController {
public List<HardDoorManagerEntity> export(HardDoorManagerEntity hardDoorManager, Long[] ids) {
return hardDoorManagerService.list(Wrappers.lambdaQuery(hardDoorManager).in(ArrayUtil.isNotEmpty(ids), HardDoorManagerEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller.order;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -43,6 +44,7 @@ public class HardAfterSaleController {
private final HardAfterSaleService hardAfterSaleService;
/* ************************************* start app start ************************************* */
@ApiCryptoAes
@PostMapping(value = "/app/create")
@Operation(summary = "app申请售后")
@Idempotent(expireTime = 10, info = "正在申请中,请勿重复操作")
@@ -52,6 +54,7 @@ public class HardAfterSaleController {
return R.ok(hardAfterSaleService.create(dto));
}
@ApiCryptoAes
@GetMapping(value = "/app/cancel")
@Operation(summary = "app取消售后")
@Idempotent(expireTime = 10, info = "正在取消中,请勿重复操作")
@@ -60,12 +63,14 @@ public class HardAfterSaleController {
return R.ok(hardAfterSaleService.cancelAfterSale(user.getId(), id));
}
@ApiCryptoAes
@GetMapping(value = "/app/history")
@Operation(summary = "app查询售后进度")
public R<List<HardAfterSaleLogEntity>> appHistory(@RequestParam Long id) {
return R.ok(hardAfterSaleService.getHistory(id));
}
@ApiCryptoAes
@GetMapping(value = "/app/detail-by-order-id")
@Operation(summary = "app查询退款详情")
public R<HardAfterSaleVo> appDetail(@RequestParam Long id) {
@@ -75,6 +80,7 @@ public class HardAfterSaleController {
}
@Operation(summary = "app商户同意退款", description = "app商户同意退款")
@ApiCryptoAes
@PostMapping("/app/mch-agree")
@Idempotent(expireTime = 5, info = "正在处理中,请勿重复操作")
public R appMchRefund(@RequestParam Long id) {
@@ -83,6 +89,7 @@ public class HardAfterSaleController {
}
@Operation(summary = "app商户拒绝退款", description = "app商户同意退款")
@ApiCryptoAes
@PostMapping("/app/mch-disagree")
@Idempotent(expireTime = 5, info = "正在处理中,请勿重复操作")
public R appMchDisagreeRefund(@RequestBody HardDisagreeDto dto) {
@@ -210,4 +217,4 @@ public class HardAfterSaleController {
public List<HardAfterSaleEntity> export(HardAfterSaleEntity hardAfterSale, Long[] ids) {
return hardAfterSaleService.list(Wrappers.lambdaQuery(hardAfterSale).in(ArrayUtil.isNotEmpty(ids), HardAfterSaleEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller.order;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.common.core.util.R;
@@ -32,6 +33,7 @@ public class HardCanteenDeptTotalController {
private final HardCanteenTotalService canteenTotalService;
@Operation(summary = "食堂菜品购买部门统计", description = "食堂菜品购买部门统计")
@ApiCryptoAes
@PostMapping("/list-by-dept")
public R<List<HardCanteenProductTotalVo>> listByDept(@RequestBody HardOrderDto dto) {
DataScope dataScope = null;
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller.order;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -47,6 +48,7 @@ public class HardCanteenTotalController {
* 菜品销量按照分类查询
*/
@Operation(summary = "菜品销量按照分类查询", description = "菜品销量按照分类查询")
@ApiCryptoAes
@PostMapping("/app/product-by-classify")
public R<List<HardAppProductByClassifyVo>> productByClassify(@RequestBody HardAppProductByClassifyDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -60,6 +62,7 @@ public class HardCanteenTotalController {
* 近一周各个食堂菜品购买统计
*/
@Operation(summary = "近一周各个食堂菜品购买统计", description = "近一周各个食堂菜品购买统计")
@ApiCryptoAes
@PostMapping("/app/product-by-canteen")
public R<List<Map<String, List<HardAppProductByCanteenVo>>>> productByCanteen(@RequestBody HardAppProductByCanteenDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -73,6 +76,7 @@ public class HardCanteenTotalController {
* 个人菜品喜好排行
*/
@Operation(summary = "个人菜品喜好排行", description = "个人菜品喜好排行")
@ApiCryptoAes
@PostMapping("/app/product-like-top")
public R<List<HardAppProductLikeTopVo>> productLikeTop(@RequestBody HardAppProductLikeTopDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller.order;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -54,12 +55,14 @@ public class HardCarController {
private final HardAfterSaleCarService hardAfterSaleCarService;
/* ************************************* start app start ************************************* */
@ApiCryptoAes
@GetMapping("/app/parent-car")
@Operation(summary = "查询父亲购物车")
public R<HardParentCarEntity> appGetParentCar(@RequestParam Long id) {
return R.ok(hardParentCarService.getById(id));
}
@ApiCryptoAes
@GetMapping("/app/mch-detail")
@Operation(summary = "根据商户id查询当前用户购物车")
public R<List<HardCarVo>> appMchDetail(@RequestParam Long merchantId, @RequestParam HardTypeEnum hardType) {
@@ -67,12 +70,14 @@ public class HardCarController {
return R.ok(hardCarService.mchDetail(merchantId, user.getId(), hardType));
}
@ApiCryptoAes
@GetMapping("/app/order-id")
@Operation(summary = "根据订单id查询购物车")
public R<List<HardCarVo>> appOrderId(@RequestParam Long orderId) {
return R.ok(hardCarService.getByOrderId(orderId));
}
@ApiCryptoAes
@PostMapping("/app/save-or-upload")
@Operation(summary = "新增或者更新购物车")
public R saveOrUpload(@RequestBody HardCarSaveOrUpdateDto dto) {
@@ -157,4 +162,4 @@ public class HardCarController {
public List<HardCarEntity> export(HardCarEntity hardCar, Long[] ids) {
return hardCarService.list(Wrappers.lambdaQuery(hardCar).in(ArrayUtil.isNotEmpty(ids), HardCarEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller.order;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.LocalDateTimeUtil;
@@ -126,6 +127,7 @@ public class HardOrderController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app查询订单列表", description = "app查询订单列表")
@ApiCryptoAes
@GetMapping("/app/page-join")
public R appPageJoin(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -135,6 +137,7 @@ public class HardOrderController {
}
@Operation(summary = "app查询超市订单列表", description = "app查询订单列表")
@ApiCryptoAes
@GetMapping("/app/sup-page-join")
public R appSupPageJoin(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -145,6 +148,7 @@ public class HardOrderController {
}
@Operation(summary = "app查询toc自提柜订单", description = "app查询toc自提柜订单")
@ApiCryptoAes
@GetMapping("/app/toc-door-page-join")
public R appTocDoorPageJoin(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -155,6 +159,7 @@ public class HardOrderController {
}
@Operation(summary = "app查询食堂订单列表", description = "app查询订单列表")
@ApiCryptoAes
@GetMapping("/app/caneen-page-join")
public R appCaneenPageJoin(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -165,6 +170,7 @@ public class HardOrderController {
}
@Operation(summary = "app查询共富商城列表", description = "app查询共富商城列表")
@ApiCryptoAes
@GetMapping("/app/farmer-page-join")
public R appFarmerPageJoin(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -175,6 +181,7 @@ public class HardOrderController {
}
@Operation(summary = "app商户查询订单列表", description = "app商户查询订单列表")
@ApiCryptoAes
@GetMapping("/app/mch-page-join")
public R appMchPageJoin(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
dto.setIsFindCarList(false);
@@ -197,12 +204,14 @@ public class HardOrderController {
}
@Operation(summary = "app查询订单详情", description = "app查询订单详情")
@ApiCryptoAes
@GetMapping("/app/detail")
public R appDetail(@RequestParam Long id) {
return R.ok(hardwareOrderService.join(id));
}
@Operation(summary = "app创建食堂预定订单", description = "app创建食堂预定订单")
@ApiCryptoAes
@GetMapping("/app/create-order")
@Idempotent(expireTime = 3, key = "'/app/hard-order/app/create-order' + #carParentId ", info = "正在创建订单中,请勿重复操作")
public R appCreateOrder(@RequestParam Long carParentId, @RequestParam Long apptId, @RequestParam HardTypeEnum hardType) {
@@ -215,6 +224,7 @@ public class HardOrderController {
description = "配送详情页:按商户 MchManage.jobTime 切分时段;与下单校验一致。"
+ "不传 expectDate 时从「今天」起算;days 为连续天数(含起始日),如 days=3 表示今天+明天+后天。"
+ "仅「日历日为今天」时按 leadMinutes 过滤已过近的格子。")
@ApiCryptoAes
@GetMapping("/app/take-out/delivery-time-slots")
public R<HardTakeOutDeliveryTimeOptionVO> takeOutDeliveryTimeSlots(
@RequestParam Long merchantId,
@@ -226,6 +236,7 @@ public class HardOrderController {
}
@Operation(summary = "app创建食堂外卖订单", description = "app创建食堂外卖订单")
@ApiCryptoAes
@PostMapping("/app/create-take-out-order")
@Idempotent(expireTime = 3, key = "'/app/hard-order/app/create-take-out-order' + #dto.getCarParentId() ", info = "正在创建订单中,请勿重复操作")
public R appCreateTakeOutOrder(@Validated @RequestBody HardAppCreateTakeOutOrderDto dto) {
@@ -245,6 +256,7 @@ public class HardOrderController {
}
@Operation(summary = "app创建线上超市预定订单", description = "app创建线上超市预定订单")
@ApiCryptoAes
@GetMapping("/app/create-supermarket-order")
@Idempotent(expireTime = 3, key = "'/app/hard-order/app/create-supermarket-order' + #carParentId ", info = "正在创建订单中,请勿重复操作")
public R<Long> appCreateSupermarketReserveOrder(@RequestParam Long carParentId, @RequestParam HardTypeEnum hardType) {
@@ -262,6 +274,7 @@ public class HardOrderController {
}
@Operation(summary = "创建共富商城预约订单", description = "app创建线上超市预定订单")
@ApiCryptoAes
@PostMapping("/app/create-farmer-order")
@Idempotent(expireTime = 3, key = "'/app/hard-order/app/create-farmer-order' + #body.getCarParentId() ", info = "正在创建订单中,请勿重复操作")
public R<Long> appCreateFarmerReserveOrder(@RequestBody HardAppCreateFarmerOrderDto body) {
@@ -274,6 +287,7 @@ public class HardOrderController {
}
@Operation(summary = "app创建订单扫一扫", description = "app创建订单扫一扫")
@ApiCryptoAes
@PostMapping("/app/create-order-scan-qrcode")
@Idempotent(expireTime = 5, info = "正在创建订单中,请勿重复操作")
public R<Long> appCreateOrderScancode(@Validated @RequestBody HardAppCreateOrderScancode body) {
@@ -291,6 +305,7 @@ public class HardOrderController {
}
@Operation(summary = "app创建活动订单", description = "app创建活动订单")
@ApiCryptoAes
@PostMapping("/app/create-act-order")
@Idempotent(expireTime = 3, key = "'/hard-order/app/create-act-order' + #body.getCancelId() ", info = "正在创建订单中,请勿重复操作")
public R<Long> appCreateActOrder(@Validated @RequestBody HardCreateActOrderDto body) {
@@ -468,4 +483,4 @@ public class HardOrderController {
excelWriter.fill(excelList, fillConfig, writeSheet);
}
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller.order;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.LocalDateTimeUtil;
@@ -71,6 +72,7 @@ public class HardOrderTotalController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app查询商户每天流水记录", description = "app查询订单列表根据权限")
@ApiCryptoAes
@GetMapping("/app/mch-water-day")
public R appMchWaterDay(@ParameterObject Page page, @ParameterObject HardOrderDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -93,6 +95,7 @@ public class HardOrderTotalController {
}
@Operation(summary = "app查询商户全部流水记录", description = "app查询商户全部流水记录")
@ApiCryptoAes
@GetMapping("/app/mch-water-total")
public R appMchWaterTotal(@ParameterObject HardOrderDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller.spu;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -59,6 +60,7 @@ public class HardSpuController {
/* ************************************* start APP start ************************************* */
@Operation(summary = "app上架", description = "上架")
@ApiCryptoAes
@PostMapping("/app/putaway")
@Idempotent(expireTime = 5, info = "正在上架中,请勿重复操作")
public R appPutaway(@Valid @RequestBody HardPutawayDto dto) {
@@ -67,6 +69,7 @@ public class HardSpuController {
}
@Operation(summary = "app下架", description = "下架")
@ApiCryptoAes
@PostMapping("/app/un-putaway")
@Idempotent(expireTime = 5, info = "正在下架中,请勿重复操作")
public R appUnPutaway(@Valid @RequestBody HardPutawayDto dto) {
@@ -75,18 +78,21 @@ public class HardSpuController {
}
@Operation(summary = "app查询货柜补货商品列表", description = "查询货柜补货商品列表")
@ApiCryptoAes
@GetMapping("/app/cabinet-putaway-list")
public R appCabinetPutawayList(@RequestParam Long hardDoorId, @RequestParam String cabinetNo) {
return R.ok(hardSpuService.appCabinetPutawayList(hardDoorId, cabinetNo));
}
@Operation(summary = "app查询货柜商品列表", description = "查询货柜商品列表")
@ApiCryptoAes
@GetMapping("/app/cabinet-list")
public R appCabinetList(@RequestParam Long hardId, @RequestParam String cabinetNo) {
return R.ok(hardSpuService.getByCabinetNo(hardId, cabinetNo));
}
@Operation(summary = "app商品类表", description = "app商品类表")
@ApiCryptoAes
@GetMapping("/app/page")
public R appPage(@ParameterObject Page page, @ParameterObject HardSpuDto dto) {
DataScope dataScope = null;
@@ -190,4 +196,4 @@ public class HardSpuController {
public List<HardSpuEntity> export(HardSpuEntity hardSpu, Long[] ids) {
return hardSpuService.list(Wrappers.lambdaQuery(hardSpu).in(ArrayUtil.isNotEmpty(ids), HardSpuEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.hard.controller.spu;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -45,6 +46,7 @@ public class HardSpuRepertoryController {
/* ************************************* start APP start ************************************* */
@Operation(summary = "app上架完成", description = "app上架完成")
@ApiCryptoAes
@PostMapping("/app/repertory-done")
@Idempotent(expireTime = 5, info = "正在操作中,请勿重复操作")
public R<Boolean> appRepertoryDone(@Valid @RequestBody DeductionSpuRepertoryDto body) {
@@ -115,4 +117,4 @@ public class HardSpuRepertoryController {
public List<HardSpuRepertoryEntity> export(HardSpuRepertoryEntity hardSpuRepertory, Long[] ids) {
return hardSpuRepertoryService.list(Wrappers.lambdaQuery(hardSpuRepertory).in(ArrayUtil.isNotEmpty(ids), HardSpuRepertoryEntity::getId, ids));
}
}
}
@@ -13,6 +13,10 @@
<artifactId>pjcloud-integrated-biz</artifactId>
<dependencies>
<dependency>
<groupId>com.bsd</groupId>
<artifactId>pjcloud-common-encrypt-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -64,6 +65,7 @@ import java.io.IOException;
@Tag(description = "visitorUser" , name = "h5访客接口" )
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
@Inner(value = false)
@ApiCryptoAes
public class AppVisitorController {
private final VisitorUserService visitorUserService;
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.auth0.jwt.JWT;
@@ -38,6 +39,7 @@ import java.util.*;
@Tag(description = "visitorUser" , name = "访客用户管理" )
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
@Inner(value = false)
@ApiCryptoAes
public class AppVisitorUserController {
private final VisitorUserService visitorUserService;
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -146,6 +147,7 @@ public class FeedbackController {
*/
@Operation(summary = "app新增意见反馈" , description = "app新增意见反馈" )
@SysLog("新增意见反馈" )
@ApiCryptoAes
@PostMapping("/app/save")
public R appSave(@RequestBody FeedbackAppDTO feedbackAppDTO) {
Long id = SecurityUtils.getUser().getId();
@@ -162,6 +164,7 @@ public class FeedbackController {
* @return
*/
@Operation(summary = "app分页查询" , description = "app分页查询" )
@ApiCryptoAes
@GetMapping("/app/page" )
public R getAppPage(@ParameterObject Page page, @ParameterObject FeedbackEntity feedback) {
LambdaQueryWrapper<FeedbackEntity> wrapper = Wrappers.lambdaQuery();
@@ -177,6 +180,7 @@ public class FeedbackController {
* @return
*/
@Operation(summary = "app分页查询" , description = "app分页查询" )
@ApiCryptoAes
@GetMapping("/app/getDetails" )
public R getAppPage(@RequestParam("id")Long id) {
LambdaQueryWrapper<FeedbackEntity> wrapper = Wrappers.lambdaQuery();
@@ -186,6 +190,7 @@ public class FeedbackController {
}
@Operation(summary = "获取反馈类型" , description = "获取反馈类型" )
@ApiCryptoAes
@GetMapping("/app/getFeedbackType" )
public R<List<FeedbackTypeVO>> getFeedbackType() {
R<List<SysDictItem>> dictResult = remoteDictService.getDictByType("feedback_type");
@@ -233,4 +238,4 @@ public class FeedbackController {
}).collect(Collectors.toList());
return R.ok(voList);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -133,6 +134,7 @@ public class LostAndFoundController {
* @return
*/
@Operation(summary = "失物招领app分页查询" , description = "物招领app分页查询" )
@ApiCryptoAes
@GetMapping("/app/page" )
public R getLostAndFoundAppPage(@ParameterObject Page page, @ParameterObject LostAndFoundEntity lostAndFound) {
LambdaQueryWrapper<LostAndFoundEntity> wrapper = Wrappers.lambdaQuery();
@@ -150,6 +152,7 @@ public class LostAndFoundController {
}
@Operation(summary = "失物招领app详情查询" , description = "失物招领app详情查询" )
@ApiCryptoAes
@GetMapping("/app/getDetails")
public R getLostAndFoundAppDetail(@RequestParam("id") Long id) {
LostAndFoundEntity lostAndFound = lostAndFoundService.getById(id);
@@ -160,4 +163,4 @@ public class LostAndFoundController {
return R.ok(lostAndFoundPageVo);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -144,6 +145,7 @@ public class MaintenanceOrderController {
* @param dto 维修工单申请参数
* @return R
*/
@ApiCryptoAes
@PostMapping("/app/apply")
@Operation(summary = "App端-维修申请新增", description = "App端用户提交维修申请")
@SysLog("App端-维修申请新增")
@@ -163,6 +165,7 @@ public class MaintenanceOrderController {
* @param page 分页对象
* @return R
*/
@ApiCryptoAes
@GetMapping("/app/my")
@Operation(summary = "App端-我的维修分页列表", description = "App端用户分页查询自己的维修单,按创建时间倒序")
// @PreAuthorize("@pms.hasPermission('integrated_maintenanceOrder_view')")
@@ -187,6 +190,7 @@ public class MaintenanceOrderController {
* @param id 维修单ID
* @return R
*/
@ApiCryptoAes
@GetMapping("/app/my/{id}")
@Operation(summary = "App端-我的维修单详情", description = "App端用户查看自己维修单详情,包含处理说明和处理图片")
// @PreAuthorize("@pms.hasPermission('integrated_maintenanceOrder_view')")
@@ -235,6 +239,7 @@ public class MaintenanceOrderController {
}
@Operation(summary = "获取维修类型" , description = "获取维修类型" )
@ApiCryptoAes
@GetMapping("/app/getFeedbackType" )
public R<List<MaintenanceTypeVO>> getFeedbackType() {
R<List<SysDictItem>> dictResult = remoteDictService.getDictByType("maintenance_type");
@@ -296,4 +301,4 @@ public class MaintenanceOrderController {
return R.failed("工单处理失败");
}
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -251,6 +252,7 @@ public class MeetingBookingController {
/**
* 会议结束,经办人点击确认发送短信通知阿姨
*/
@ApiCryptoAes
@PostMapping("/app/confirm-end-meeting/{bookingId}")
public R<Boolean> confirmEndMeeting(@PathVariable("bookingId") Long bookingId) {
return R.ok(meetingBookingService.confirmEndMeeting(bookingId));
@@ -277,4 +279,4 @@ public class MeetingBookingController {
MeetingStatsVo stats = meetingBookingService.getMeetingStats(queryDto);
return R.ok(stats);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -127,6 +128,7 @@ public class MeetingDeskLayoutController {
* @return R
*/
@Operation(summary = "移动端获取摆放形式列表", description = "移动端预约课程时选择摆放形式")
@ApiCryptoAes
@GetMapping("/app/list")
public R<List<MeetingDeskLayoutAppVO>> getAppLayoutList() {
LambdaQueryWrapper<MeetingDeskLayoutEntity> wrapper = Wrappers.lambdaQuery();
@@ -140,4 +142,4 @@ public class MeetingDeskLayoutController {
return R.ok(voList);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -183,6 +184,7 @@ public class MeetingRoomController {
/**---------------------------APP------------------------------*/
@ApiCryptoAes
@GetMapping("/app/page")
public R<Page<MeetingRoomPageVo>> appList(@ParameterObject Page page, @ParameterObject MeetingPageDto meetingRoom) {
LambdaQueryWrapper<MeetingRoomEntity> meetingRoomEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
@@ -360,6 +362,7 @@ public class MeetingRoomController {
* @param page 分页对象
* @param checkStatus 审核状态(可选),传空查全部
*/
@ApiCryptoAes
@GetMapping("/app/my-bookings")
public R<Page<MeetingBookingListVo>> myBookings(@ParameterObject Page page, @RequestParam(value = "checkStatus", required = false) String checkStatus) {
Long userId = SecurityUtils.getUser().getId();
@@ -466,6 +469,7 @@ public class MeetingRoomController {
/**
* 取消预约
*/
@ApiCryptoAes
@PostMapping("/app/cancel-booking/{bookingId}")
public R<Boolean> cancelBooking(@PathVariable("bookingId") Long bookingId) {
Long userId = SecurityUtils.getUser().getId();
@@ -496,6 +500,7 @@ public class MeetingRoomController {
/**
* 预约详情
*/
@ApiCryptoAes
@GetMapping("/app/booking-detail/{bookingId}")
public R<MeetingBookingDetailVo> bookingDetail(@PathVariable("bookingId") Long bookingId) {
Long userId = SecurityUtils.getUser().getId();
@@ -623,6 +628,7 @@ public class MeetingRoomController {
* @param date 查询日期
* @return 会议室预约详情
*/
@ApiCryptoAes
@GetMapping("/app/booking-detail-page/{roomId}")
@Operation(summary = "会议室预约详情页面", description = "获取指定会议室在指定日期的预约详情,包含时间段状态和预约列表")
public R<MeetingRoomBookingDetailVo> getMeetingRoomBookingDetail(@PathVariable("roomId") Long roomId,
@@ -786,6 +792,7 @@ public class MeetingRoomController {
/**
* 会议室下拉选择(仅返回可用会议室id和名称)
*/
@ApiCryptoAes
@GetMapping("/app/select")
public R<List<Map<String, Object>>> selectMeetingRooms() {
LambdaQueryWrapper<MeetingRoomEntity> wrapper = Wrappers.lambdaQuery();
@@ -804,4 +811,4 @@ public class MeetingRoomController {
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -139,6 +140,7 @@ public class NoticeController {
* @return R
*/
@Operation(summary = "App分页公告列表", description = "App分页公告列表")
@ApiCryptoAes
@GetMapping("/app/page")
public R getAppNoticePage(@ParameterObject Page page, @RequestParam(required = false) String title) {
LambdaQueryWrapper<NoticeEntity> wrapper = Wrappers.lambdaQuery();
@@ -158,6 +160,7 @@ public class NoticeController {
* @return R
*/
@Operation(summary = "App公告详情", description = "App公告详情")
@ApiCryptoAes
@GetMapping("/app/{id}")
public R getAppNoticeDetail(@PathVariable("id") Long id) {
NoticeEntity notice = noticeService.getById(id);
@@ -177,6 +180,7 @@ public class NoticeController {
* @return R
*/
@Operation(summary = "App公告浏览量+1", description = "App公告浏览量+1")
@ApiCryptoAes
@PostMapping("/app/view/{id}")
public R addViewCount(@PathVariable("id") Long id) {
NoticeEntity notice = noticeService.getById(id);
@@ -289,4 +293,4 @@ public class NoticeController {
return false;
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -139,6 +140,7 @@ public class VisitorsController {
*/
@Operation(summary = "app新增邀约" , description = "app新增拜访" )
@SysLog("新增邀约" )
@ApiCryptoAes
@PostMapping("/app/saveYY")
@Idempotent(expireTime = 5, info = "请勿重复提交")
public R saveYY(@RequestBody VisitorsYYAppDTO visitors) {
@@ -147,6 +149,7 @@ public class VisitorsController {
}
@ApiCryptoAes
@GetMapping("/app/yy/page")
@SysLog("获取我的邀约记录" )
public R getPageBF(@ParameterObject Page page, @ParameterObject VisitorsEntity visitors) {
@@ -157,6 +160,7 @@ public class VisitorsController {
// public R haveVisitor(@RequestParam("id")Long id) {
// return R.ok( visitorsService.haveVisitor(id));
// }
@ApiCryptoAes
@GetMapping("/app/updateCheckStatus")
@SysLog("更新状态" )
public R updateCheckStatus(@RequestParam("id")Long id,@RequestParam("checkStatus")String checkStatus) {
@@ -174,4 +178,4 @@ public class VisitorsController {
return visitorsService.getDictListByType(type);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller.ad;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -59,6 +60,7 @@ public class AdRecordController {
/* ************************************* start app start ************************************* */
@Operation(summary = "上报广告浏览记录", description = "上报广告浏览记录")
@ApiCryptoAes
@PostMapping("/app/report-ad-view")
public R<Boolean> reportAdView(@RequestBody AdRecordDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -67,6 +69,7 @@ public class AdRecordController {
}
@Operation(summary = "个人积分广告分页", description = "个人积分广告分页")
@ApiCryptoAes
@GetMapping("/app/integral-page")
public R<Page<AdRecordVo>> integralPage(@ParameterObject Page page, @ParameterObject AdRecordDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -138,4 +141,4 @@ public class AdRecordController {
public List<AdRecordEntity> export(AdRecordEntity thirdAdRecord, Long[] ids) {
return adRecordService.list(Wrappers.lambdaQuery(thirdAdRecord).in(ArrayUtil.isNotEmpty(ids), AdRecordEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.integrated.controller.app;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -39,6 +40,7 @@ public class AppVersionController {
/* ************************************* start app start ************************************* */
@Operation(summary = "获取最新版本", description = "获取最新版本")
@ApiCryptoAes
@GetMapping("/app/last-version")
public R<AppVersionEntity> lastVersion(@ParameterObject AppVersionDto dto) {
return R.ok(appVersionService.lastVersion(dto));
@@ -97,4 +99,4 @@ public class AppVersionController {
public R removeById(@RequestBody Long[] ids) {
return R.ok(appVersionService.removeBatchByIds(CollUtil.toList(ids)));
}
}
}
@@ -13,6 +13,10 @@
<artifactId>pjcloud-supermarket-biz</artifactId>
<dependencies>
<dependency>
<groupId>com.bsd</groupId>
<artifactId>pjcloud-common-encrypt-api</artifactId>
</dependency>
<!-- 幂等插件使用 -->
<!-- 重复提交 -->
<dependency>
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.supermarket.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.bsd.pjcloud.common.core.util.R;
@@ -18,6 +19,7 @@ import java.util.Objects;
@RequestMapping("/app/shopCategory")
@Tag(name = "App分类", description = "移动端分类接口")
@RequiredArgsConstructor
@ApiCryptoAes
public class AppShopCategoryController {
private final ShopCategoryService shopCategoryService;
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.supermarket.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -31,6 +32,7 @@ import com.bsd.pjcloud.supermarket.dto.SkuStockChangeDTO;
@RequestMapping("/app/shopSpu")
@Tag(name = "App商品", description = "移动端商品接口")
@RequiredArgsConstructor
@ApiCryptoAes
public class AppShopSpuController {
private final ShopSpuService shopSpuService;
private final ShopSkuService shopSkuService;
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.supermarket.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
@@ -58,6 +59,7 @@ import java.util.stream.Collectors;
@RequestMapping("/app/mall")
@Tag(name = "移动端商城", description = "移动端商城接口")
@RequiredArgsConstructor
@ApiCryptoAes
public class MallAppController {
private final MallCategoryService mallCategoryService;
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.supermarket.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -143,6 +144,7 @@ public class SmErpCategoryController {
* @return
*/
@Operation(summary = "APP分类查询",description = "通过商户id获取该商户下的分类")
@ApiCryptoAes
@GetMapping("/app/simpleAll")
public R<List<SmErpCategorySimpleVo>> getAppSimpleAll(@RequestParam("merchantId")Long merchantId) {
List<SmErpCategoryEntity> list = smErpCategoryService.
@@ -151,4 +153,4 @@ public class SmErpCategoryController {
return R.ok(bean);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.supermarket.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -407,6 +408,7 @@ public class SmErpSpuController {
* @return
*/
@Operation(summary = "APP根据条件查询分页SPU" , description = "APP条件分页查询" )
@ApiCryptoAes
@PostMapping("/app/selectListAll" )
@PreAuthorize("@pms.hasPermission('supermarket_supermarketSpu_view')" )
public R getSupermarketSpu(@RequestBody SupermarketSpuAppQueryDTO supermarketSpuQueryDTO,@ParameterObject Page page) {
@@ -419,11 +421,13 @@ public class SmErpSpuController {
* @return
*/
@Operation(summary = "app获取spu详情" , description = "根据spu的id" )
@ApiCryptoAes
@GetMapping("/app/SpuDetails" )
public R getSupermarketSpuAppDetailById(@RequestParam("id")Long id) {
return R.ok(smErpSpuService.getSupermarketSpuAppDetailById(id));
}
@ApiCryptoAes
@GetMapping("/app/checkSpuStock")
@SysLog("购物车效验库存")
@Transactional
@@ -493,4 +497,4 @@ public class SmErpSpuController {
return R.ok();
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.supermarket.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.StrUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -161,6 +162,7 @@ public class SmSpuController {
* @return
*/
@Operation(summary = "APP在线商城数据查询",description = "通过商户id获取该商户下的在线商品数据")
@ApiCryptoAes
@GetMapping("/app/onlineShopList")
public R<IPage<OnlineShopVo>> getOnlineShopList(@RequestParam("categoryId")Long categoryId,@ParameterObject Page page) {
@@ -176,6 +178,7 @@ public class SmSpuController {
* @return
*/
@Operation(summary = "APP在线商城分类数据查询",description = "获取商户下所有获取分类通过商户id")
@ApiCryptoAes
@GetMapping("/app/onlineCategoryList")
public R<List<SmErpCategorySimpleVo>> getOnlineCategoryList(@RequestParam("merchantId")Long merchantId) {
@@ -208,4 +211,4 @@ public class SmSpuController {
return R.ok(bean);
}
}
}
+4
View File
@@ -13,6 +13,10 @@
<artifactId>pjcloud-thirdparty-biz</artifactId>
<dependencies>
<dependency>
<groupId>com.bsd</groupId>
<artifactId>pjcloud-common-encrypt-api</artifactId>
</dependency>
<!-- 支付宝SDK -->
<dependency>
<groupId>com.alipay.sdk</groupId>
@@ -1,5 +1,6 @@
package com.bsd.pjcloud.thirdparty.controller.appplus;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.bsd.pjcloud.common.core.util.R;
import com.bsd.pjcloud.common.security.annotation.Inner;
import com.bsd.pjcloud.common.security.service.PjcloudUser;
@@ -42,6 +43,7 @@ public class ThirdMinAppPayCotroller {
/* ************************************* start app start ************************************* */
@Operation(summary = "查询支付订单")
@ApiCryptoAes
@GetMapping("/app/get-by-pay-no")
public R<ThirdPayOrderVo> getByPayNo(@RequestParam String payNo) {
PjcloudUser user = SecurityUtils.getUser();
@@ -49,6 +51,7 @@ public class ThirdMinAppPayCotroller {
}
@Operation(summary = "支付")
@ApiCryptoAes
@PostMapping("/app/pay")
public R<ThirdMiniAppPayVo> miniPay(@Validated @RequestBody ThirdMiniAppPayDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.admin.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.bsd.pjcloud.admin.api.dto.UserDTO;
import com.bsd.pjcloud.admin.service.SysUserService;
@@ -56,6 +57,7 @@ public class RegisterController {
* @return success/false
*/
@SysLog("重置用户密码")
@ApiCryptoAes
@PostMapping("/password")
public R<Boolean> resetUserPassword(@RequestBody UserDTO userDto) {
return userService.resetUserPassword(userDto);
@@ -16,6 +16,7 @@
*/
package com.bsd.pjcloud.admin.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -27,6 +27,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bsd.pjcloud.admin.api.entity.SysRole;
import com.bsd.pjcloud.admin.api.entity.SysUserRole;
import com.bsd.pjcloud.admin.api.vo.RoleAppUserRoleVo;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.bsd.pjcloud.admin.api.vo.RoleExcelVO;
import com.bsd.pjcloud.admin.api.vo.RoleMenuVO;
import com.bsd.pjcloud.admin.service.SysRoleService;
@@ -76,6 +77,7 @@ public class SysRoleController {
/**
* 判断用户移动端角色
*/
@ApiCryptoAes
@GetMapping("/app/user-role")
public R<RoleAppUserRoleVo> userRole() {
PjcloudUser user = SecurityUtils.getUser();
@@ -194,6 +196,7 @@ public class SysRoleController {
* 是否是共富商户角色
* @return
*/
@ApiCryptoAes
@GetMapping("/isMallMchUser")
public R<Boolean> isMallMchUser() {
Long id = SecurityUtils.getUser().getId();
@@ -112,6 +112,7 @@ public class SysUserController {
/**
* 申请注销
*/
@ApiCryptoAes
@PostMapping("/app/apply/close-account")
public R<Boolean> appApplyCloseAccount() {
PjcloudUser user = SecurityUtils.getUser();
@@ -203,6 +204,7 @@ public class SysUserController {
*
* @return 用户信息
*/
@ApiCryptoAes
@GetMapping(value = {"/info"})
public R info() {
String username = SecurityUtils.getUser().getUsername();
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.admin.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -60,6 +61,7 @@ public class SysUserFaceController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app查询人脸列表", description = "app查询人脸列表")
@ApiCryptoAes
@GetMapping("/app/page-join")
public R<Page<SysUserFaceVo>> appPageJoin(@ParameterObject Page page, @ParameterObject SysUserFaceDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -69,6 +71,7 @@ public class SysUserFaceController {
}
@Operation(summary = "app查询人脸详情", description = "app查询人脸详情")
@ApiCryptoAes
@GetMapping("/app/detail")
public R<SysUserFaceVo> appDetail(@ParameterObject Long id) {
return R.ok(sysUserFaceService.join(id));
@@ -76,6 +79,7 @@ public class SysUserFaceController {
@Operation(summary = "新增人脸样本表", description = "新增人脸样本表")
@SysLog("app新增人脸样本表")
@ApiCryptoAes
@PostMapping("/app")
@Idempotent(expireTime = 3, info = "正在处理中,请勿重复操作")
public R appSave(@RequestBody SysUserFaceEntity dto) {
@@ -86,6 +90,7 @@ public class SysUserFaceController {
@Operation(summary = "app修改人脸样本表", description = "修改人脸样本表")
@SysLog("修改人脸样本表")
@ApiCryptoAes
@PutMapping("/app")
public R appUpdateById(@RequestBody SysUserFaceEntity sysUserFace) {
sysUserFaceService.edit(sysUserFace);
@@ -94,6 +99,7 @@ public class SysUserFaceController {
@Operation(summary = "app删除人脸", description = "通过id删除人脸样本表")
@SysLog("app通过id删除人脸样本表")
@ApiCryptoAes
@DeleteMapping("/app")
public R appRemoveById(@RequestParam Long id) {
sysUserFaceService.delByIds(CollUtil.toList(id));
@@ -187,4 +193,4 @@ public class SysUserFaceController {
return sysUserFaceService.list(
Wrappers.lambdaQuery(sysUserFace).in(ArrayUtil.isNotEmpty(ids), SysUserFaceEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.admin.controller.address;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -44,6 +45,7 @@ public class SysDeptBuildingController {
/**
* 按单位查询楼栋(下单/维护地址时下拉;登录即可)
*/
@ApiCryptoAes
@GetMapping("/list-by-dept")
@Operation(summary = "按单位ID查询楼栋列表")
public R<List<SysDeptBuildingEntity>> listByDept(@RequestParam("deptId") Long deptId) {
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.admin.controller.address;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.bsd.pjcloud.admin.api.dto.address.SysUserAddressDto;
import com.bsd.pjcloud.admin.api.entity.SysDept;
@@ -50,6 +51,7 @@ public class SysUserAddressController {
/**
* App 端设置地址:楼栋/单元/房间 级联下拉数据
*/
@ApiCryptoAes
@GetMapping("/app/options/buildings")
@Operation(summary = "当前用户所属单位-楼栋下拉")
public R<List<SimpleOptionVo>> appBuildings() {
@@ -68,6 +70,7 @@ public class SysUserAddressController {
return R.ok(options);
}
@ApiCryptoAes
@GetMapping("/app/options/units")
@Operation(summary = "楼栋-单元下拉(校验归属当前单位)")
public R<List<SimpleOptionVo>> appUnits(
@@ -87,6 +90,7 @@ public class SysUserAddressController {
return R.ok(options);
}
@ApiCryptoAes
@GetMapping("/app/options/rooms")
@Operation(summary = "单元-房间下拉(含楼层,校验归属当前单位)")
public R<List<SimpleOptionVo>> appRooms(
@@ -110,6 +114,7 @@ public class SysUserAddressController {
return R.ok(options);
}
@ApiCryptoAes
@GetMapping("/app/list")
@Operation(summary = "当前用户配送地址列表")
public R<List<SysUserAddressVo>> appList() {
@@ -118,6 +123,7 @@ public class SysUserAddressController {
}
@SysLog("新增用户配送地址")
@ApiCryptoAes
@PostMapping("/app")
@Operation(summary = "新增配送地址")
public R<Long> appSave(@Valid @RequestBody SysUserAddressDto dto) {
@@ -126,6 +132,7 @@ public class SysUserAddressController {
}
@SysLog("修改用户配送地址")
@ApiCryptoAes
@PutMapping("/app")
@Operation(summary = "修改配送地址")
public R<Void> appUpdate(@Valid @RequestBody SysUserAddressDto dto) {
@@ -135,6 +142,7 @@ public class SysUserAddressController {
}
@SysLog("删除用户配送地址")
@ApiCryptoAes
@DeleteMapping("/app/{id}")
@Operation(summary = "删除配送地址")
public R<Void> appRemove(@PathVariable Long id) {
@@ -143,6 +151,7 @@ public class SysUserAddressController {
return R.ok();
}
@ApiCryptoAes
@PutMapping("/app/default/{id}")
@Operation(summary = "设为默认配送地址")
public R<Void> appSetDefault(@PathVariable Long id) {
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.admin.controller.car;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -50,6 +51,7 @@ public class SysUserCarController {
/* ************************************* start app start ************************************* */
@ApiCryptoAes
@PostMapping("/app/create")
public R appCreateCar(@Validated @RequestBody SysUserCarDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -58,6 +60,7 @@ public class SysUserCarController {
return R.ok();
}
@ApiCryptoAes
@PostMapping("/app/page")
public R<Page<SysUserCarVo>> appCarPage(@ParameterObject Page page, @ParameterObject SysUserCarDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -133,4 +136,4 @@ public class SysUserCarController {
public List<SysUserCarEntity> export(SysUserCarEntity sysUserCar, Long[] ids) {
return sysUserCarService.list(Wrappers.lambdaQuery(sysUserCar).in(ArrayUtil.isNotEmpty(ids), SysUserCarEntity::getId, ids));
}
}
}
@@ -9,6 +9,7 @@ import com.bsd.pjcloud.admin.api.vo.stats.AppAccessUnitStatsVO;
import com.bsd.pjcloud.admin.api.vo.stats.AppAccessPageStatsVO;
import com.bsd.pjcloud.admin.api.vo.stats.AppAccessUserTrackDistVO;
import com.bsd.pjcloud.admin.service.AppAccessStatsService;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.bsd.pjcloud.common.core.util.R;
import com.bsd.pjcloud.common.excel.annotation.ResponseExcel;
import com.bsd.pjcloud.common.security.annotation.HasPermission;
@@ -36,6 +37,7 @@ public class AppAccessStatsController {
@Inner(value = false)
@Operation(summary = "埋点上报", description = "移动端页面埋点上报")
@PostMapping("/track")
@ApiCryptoAes
public R<Boolean> track(@Valid @RequestBody AppAccessTrackRequestDTO dto, HttpServletRequest request) {
return appAccessStatsService.track(dto, request);
}
@@ -13,6 +13,10 @@
<artifactId>pjcloud-wallet-biz</artifactId>
<dependencies>
<dependency>
<groupId>com.bsd</groupId>
<artifactId>pjcloud-common-encrypt-api</artifactId>
</dependency>
<!--引入分布式事务-->
<dependency>
<groupId>com.bsd</groupId>
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.Integral;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -41,6 +42,7 @@ public class IntegralManageController {
/* ************************************* start app start ************************************* */
@Operation(summary = "创建或获取用户积分", description = "创建或获取用户积分")
@ApiCryptoAes
@GetMapping("/app/get-or-create")
public R<IntegralManageEntity> getOrCreate() {
@@ -49,6 +51,7 @@ public class IntegralManageController {
}
@Operation(summary = "我要赚钱面板统计", description = "我要赚钱面板统计")
@ApiCryptoAes
@GetMapping("/app/make-money-total")
public R<IntegralMakeMoneyTotalVo> makeMoneyTotal() {
PjcloudUser user = SecurityUtils.getUser();
@@ -120,4 +123,4 @@ public class IntegralManageController {
return integralManageService.list(Wrappers.lambdaQuery(integralManage).in(ArrayUtil.isNotEmpty(ids), IntegralManageEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.Integral;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -53,6 +54,7 @@ public class IntegralTransactionController {
/* ************************************* start app start ************************************* */
@Operation(summary = "增加信息流广告积分", description = "增加信息流广告积分")
@ApiCryptoAes
@GetMapping("/app/rewarded-integral-page")
public R<Page<IntegralTransactionVo>> appRewardedIntegralPage(@ParameterObject Page page) {
PjcloudUser user = SecurityUtils.getUser();
@@ -115,4 +117,4 @@ public class IntegralTransactionController {
public List<IntegralTransactionEntity> export(IntegralTransactionEntity integralTransaction, Long[] ids) {
return integralTransactionService.list(Wrappers.lambdaQuery(integralTransaction).in(ArrayUtil.isNotEmpty(ids), IntegralTransactionEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -98,6 +99,7 @@ public class WalletActiveController {
/* ************************************* start app start ************************************* */
@ApiCryptoAes
@PostMapping("/app/bind-card")
@SysLog("app绑定饭卡")
@Operation(summary = "app绑定饭卡")
@@ -205,4 +207,4 @@ public class WalletActiveController {
return walletActiveService.importWalletActive(excelVOList, bindingResult);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -98,6 +99,7 @@ public class WalletCodeUseController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app二维码列表(查询自己的用户)", description = "app二维码列表(查询自己的用户)")
@ApiCryptoAes
@GetMapping("/app/code-list")
public R appCodeList(@ParameterObject Page page, @ParameterObject WalletCodeUseDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -58,6 +59,7 @@ public class WalletForeignController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app分页", description = "app分页")
@ApiCryptoAes
@GetMapping("/app/page-join")
public R<Page<WalletForeignVo>> appPageJoin(@ParameterObject Page page, @ParameterObject WalletForeignDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -67,6 +69,7 @@ public class WalletForeignController {
}
@Operation(summary = "app查询详情", description = "app查询详情")
@ApiCryptoAes
@GetMapping("/app/detail")
public R<WalletForeignVo> appPageJoin(@RequestParam Long id) {
return R.ok(walletForeignService.join(id));
@@ -74,6 +77,7 @@ public class WalletForeignController {
@Operation(summary = "app申请外来人员电子餐券表", description = "app申请外来人员电子餐券表")
@SysLog("app申请外来人员电子餐券")
@ApiCryptoAes
@PostMapping("/app/apply")
@Idempotent(expireTime = 3, info = "正在申请中,请勿重复操作")
public R appSave(@RequestBody WalletForeignDto dto) {
@@ -136,4 +140,4 @@ public class WalletForeignController {
public List<WalletForeignEntity> export(WalletForeignEntity walletForeign, Long[] ids) {
return walletForeignService.list(Wrappers.lambdaQuery(walletForeign).in(ArrayUtil.isNotEmpty(ids), WalletForeignEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -51,6 +52,7 @@ public class WalletFreezeController {
/* ************************************* start flow callback start ************************************* */
/* ************************************* start app start ************************************* */
@ApiCryptoAes
@PostMapping("/app/apply-freeze")
@Operation(summary = "申请冻结")
public R<Object> appApplyFreeze(@RequestBody WalletFreezeDto dto) {
@@ -102,6 +104,7 @@ public class WalletFreezeController {
@Operation(summary = "新增饭卡冻结记录表", description = "新增饭卡冻结记录表")
@SysLog("新增饭卡冻结记录表")
@ApiCryptoAes
@PostMapping("/app")
@PreAuthorize("@pms.hasPermission('wallet_walletFreeze_add')")
public R appSave(@RequestBody WalletFreezeDto dto) {
@@ -134,4 +137,4 @@ public class WalletFreezeController {
public List<WalletFreezeEntity> export(WalletFreezeEntity walletFreeze, Long[] ids) {
return walletFreezeService.list(Wrappers.lambdaQuery(walletFreeze).in(ArrayUtil.isNotEmpty(ids), WalletFreezeEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
@@ -189,6 +190,7 @@ public class WalletManageController {
/* ************************************* start app start ************************************* */
@Operation(summary = "分页查询", description = "分页查询")
@ApiCryptoAes
@GetMapping("/app/get-all")
public R appGetAll(@ParameterObject Page page, @ParameterObject WalletManageEntity walletManage) {
PjcloudUser user = SecurityUtils.getUser();
@@ -199,12 +201,14 @@ public class WalletManageController {
}
@Operation(summary = "分页查询", description = "分页查询")
@ApiCryptoAes
@GetMapping("/app/detail")
public R appGetAll(@RequestParam Long walletId) {
PjcloudUser user = SecurityUtils.getUser();
return R.ok(walletManageService.join(walletId));
}
@ApiCryptoAes
@GetMapping("/app/get-qr-code")
@SysLog("app生成钱包二维码参数")
@Operation(summary = "生成钱包二维码参数")
@@ -212,6 +216,7 @@ public class WalletManageController {
return R.ok(walletManageService.getQrCode(walletId));
}
@ApiCryptoAes
@GetMapping("/app/is-use-door")
@Operation(summary = "是够能够使用智能柜")
public R<String> isUseDoor() {
@@ -220,6 +225,7 @@ public class WalletManageController {
}
@Operation(summary = "查询或者创建外卖配置", description = "查询或者创建外卖配置")
@ApiCryptoAes
@GetMapping("/app/get-or-create-take-out")
public R<MchTakeOutSettingEntity> appGetOrCreateTakeOut(@RequestParam Long merchId) {
MchTakeOutSettingEntity takeOutSetting = walletManageService.getOrCreateTakeOut(merchId);
@@ -334,4 +340,4 @@ public class WalletManageController {
public void exportQb(HttpServletResponse response, @ParameterObject Page page, @RequestBody WalletManageBalanceDto dto) {
walletManageService.exportQb(response, page, dto);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.bsd.pjcloud.common.core.util.R;
import com.bsd.pjcloud.common.log.annotation.SysLog;
@@ -40,6 +41,7 @@ public class WalletSettingController {
/* ************************************* end 远程调用 end ************************************* */
/* ************************************* start app start ************************************* */
@ApiCryptoAes
@GetMapping("/app/get-setting")
public R<WalletSettingVo> appGet() {
return R.ok(walletSettingService.getSetting());
@@ -70,4 +72,4 @@ public class WalletSettingController {
return R.ok(true);
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -54,6 +55,7 @@ public class WalletStrideController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app分页", description = "app分页")
@ApiCryptoAes
@GetMapping("/app/page-join")
public R appPageJoin(@ParameterObject Page page, @ParameterObject WalletStrideDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -63,6 +65,7 @@ public class WalletStrideController {
}
@Operation(summary = "app详情", description = "app详情")
@ApiCryptoAes
@GetMapping("/app/detail")
public R appPageJoin(@RequestParam Long id) {
return R.ok(walletStrideService.join(id));
@@ -70,6 +73,7 @@ public class WalletStrideController {
@Operation(summary = "app申请", description = "app申请")
@SysLog("app申请跨单位就餐")
@ApiCryptoAes
@PostMapping("/app/apply")
@Idempotent(expireTime = 3, info = "正在申请中,请勿重复操作")
public R appSave(@RequestBody WalletStrideDto dto) {
@@ -139,4 +143,4 @@ public class WalletStrideController {
public List<WalletStrideEntity> export(WalletStrideEntity walletStride, Long[] ids) {
return walletStrideService.list(Wrappers.lambdaQuery(walletStride).in(ArrayUtil.isNotEmpty(ids), WalletStrideEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
@@ -77,6 +78,7 @@ public class WalletTransactionController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app查询消费记录", description = "app查询消费记录")
@ApiCryptoAes
@GetMapping("/app/page")
public R appGetAll(@ParameterObject Page page, @ParameterObject WalletTransactionDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -357,4 +359,4 @@ public class WalletTransactionController {
return R.ok(walletTransactionService.walletTypetotal(dto, dataScope));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.act;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -43,6 +44,7 @@ public class ActAdController {
/* ************************************* start app start ************************************* */
@Operation(summary = "激励广告兑换券分页", description = "激励广告兑换券分页")
@ApiCryptoAes
@GetMapping("/app/rewarded-ad-coupon-page")
public R<Page<ActCouponVo>> rewardedAdCouponPage(@ParameterObject Page page) {
return R.ok(actAdService.rewardedAdCouponPage(page));
@@ -50,6 +52,7 @@ public class ActAdController {
@Operation(summary = "激励广告兑换券领取分页", description = "激励广告兑换券领取分页")
@ApiCryptoAes
@GetMapping("/app/rewarded-ad-apply-coupon-page")
public R<Page<ActCouponRecordVo>> rewardedAdApplyCouponPage(@ParameterObject Page page, @ParameterObject ActCouponRecordDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -58,6 +61,7 @@ public class ActAdController {
}
@Operation(summary = "激励广告兑换券兑换", description = "激励广告兑换券兑换")
@ApiCryptoAes
@GetMapping("/app/rewarded-ad-apply-coupon")
public R<Long> rewardedAdApplyCoupon(@RequestParam Long couponId) {
PjcloudUser user = SecurityUtils.getUser();
@@ -130,4 +134,4 @@ public class ActAdController {
return actAdService.list(Wrappers.lambdaQuery(actAd).in(ArrayUtil.isNotEmpty(ids), ActAdEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.act;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -34,12 +35,14 @@ public class ActCancelController {
/* ************************************* start app start ************************************* */
@Operation(summary = "根据公告id查询活动", description = "根据公告id查询活动")
@ApiCryptoAes
@GetMapping("/app/detail-by-notice-id")
public R<ActCancelEntity> getDetailByNoticeId(@RequestParam Long id) {
return R.ok(actCancelService.getDetailByNoticeId(id));
}
@Operation(summary = "根据活动id查询核销活动", description = "根据活动id查询核销活动")
@ApiCryptoAes
@GetMapping("/app/detail-by-id")
public R<ActCancelEntity> getDetailById(@RequestParam Long id) {
return R.ok(actCancelService.getDetailById(id));
@@ -87,4 +90,4 @@ public class ActCancelController {
return R.ok();
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.act;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
@@ -53,6 +54,7 @@ public class ActCancelItemController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app领取优惠券", description = "app领取优惠券")
@ApiCryptoAes
@PostMapping("/app/get")
@Idempotent(expireTime = 2, key = "'/act/cancel/app/get/' + #dto.getReceiverUserId()", info = "正在领取中,请勿重复操作")
public R<Long> appGet(@RequestBody ActCancelItemDto dto) {
@@ -63,6 +65,7 @@ public class ActCancelItemController {
}
@Operation(summary = "app查询用户的唯一优惠券", description = "app查询用户的唯一优惠券")
@ApiCryptoAes
@GetMapping("/app/find-unique")
public R<ActCancelItemVo> appFindUnique(@RequestParam Long actId) {
PjcloudUser user = SecurityUtils.getUser();
@@ -70,6 +73,7 @@ public class ActCancelItemController {
}
@Operation(summary = "app查询本店优惠券列表", description = "app查询本店优惠券列表")
@ApiCryptoAes
@GetMapping("/app/mch/page")
public R<Page<ActCancelItemVo>> appMchPage(@ParameterObject Page page, @ParameterObject ActCancelItemDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -117,4 +121,4 @@ public class ActCancelItemController {
return R.ok(actCancelItemService.removeBatchByIds(CollUtil.toList(ids)));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.act;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import com.bsd.pjcloud.common.core.util.R;
import com.bsd.pjcloud.common.security.annotation.Inner;
@@ -63,18 +64,21 @@ public class ActComController {
/* ************************************* end ad end ************************************* */
@Operation(summary = "根据公告id查询对应的活动", description = "根据公告id查询对应的活动")
@ApiCryptoAes
@GetMapping("/app/get-act-by-notify-id")
public R<ActSimpleNotfiyVo> getActByNotifyId(@RequestParam Long notifyId) {
return R.ok(actComService.getActByNotifyId(notifyId));
}
@Operation(summary = "获取活动详情", description = "获取活动详情")
@ApiCryptoAes
@GetMapping("/app/get-act-detail")
public R<ActSimpleNotfiyVo> getActDetail(@RequestParam ActTypeEnum actType, @RequestParam Long actId) {
return R.ok(actComService.getActDetail(actType, actId));
}
@Operation(summary = "判断用户是否可以参加活动", description = "判断用户是否可以参加活动")
@ApiCryptoAes
@GetMapping("/app/is-eligible-for-act")
public R<String> isEligibleForAct(@RequestParam ActTypeEnum actType, @RequestParam Long actId) {
PjcloudUser user = SecurityUtils.getUser();
@@ -82,6 +86,7 @@ public class ActComController {
}
@Operation(summary = "用户参加活动的数量统计", description = "用户参加活动的数量统计")
@ApiCryptoAes
@GetMapping("/app/user-total")
public R<ActUserTotalVo> userTotal() {
PjcloudUser user = SecurityUtils.getUser();
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.act;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ArrayUtil;
@@ -43,6 +44,7 @@ public class ActCouponRecordController {
/* ************************************* start app start ************************************* */
@Operation(summary = "领取优惠券", description = "领取优惠券")
@ApiCryptoAes
@PostMapping("/app/receive")
@Idempotent(expireTime = 2, key = "'/act/receive/app/receive/' + #dto.getReceiveUserId()", info = "正在领取中,请勿重复操作")
public R<Long> appReceive(@Valid @RequestBody ActCouponReceiveDto dto) {
@@ -52,6 +54,7 @@ public class ActCouponRecordController {
}
@Operation(summary = "用户领取核销券列表", description = "用户领取核销券列表")
@ApiCryptoAes
@GetMapping("/app/user-list")
public R<Page<ActCouponRecordVo>> userList(@ParameterObject Page page) {
PjcloudUser user = SecurityUtils.getUser();
@@ -67,6 +70,7 @@ public class ActCouponRecordController {
}
@Operation(summary = "app查询本店优惠券列表", description = "app查询本店优惠券列表")
@ApiCryptoAes
@GetMapping("/app/mch/page")
public R<Page<ActCouponRecordVo>> appMchPage(@ParameterObject Page page, @ParameterObject ActCouponRecordDto dto) {
PjcloudUser user = SecurityUtils.getUser();
@@ -117,4 +121,4 @@ public class ActCouponRecordController {
public List<ActCouponRecordEntity> export(ActCouponRecordEntity actCouponRecord, Long[] ids) {
return actCouponRecordService.list(Wrappers.lambdaQuery(actCouponRecord).in(ArrayUtil.isNotEmpty(ids), ActCouponRecordEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.mch;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -38,6 +39,7 @@ public class MchCatgoryController {
/* ************************************* start 移动端 start ************************************* */
@Operation(summary = "app下拉查询", description = "app下拉查询")
@ApiCryptoAes
@GetMapping("/app/select")
public R appSelect(@ParameterObject Page page, @ParameterObject MchCatgoryEntity mchCatgory) {
LambdaQueryWrapper<MchCatgoryEntity> wrapper = new LambdaQueryWrapper<MchCatgoryEntity>()
@@ -113,4 +115,4 @@ public class MchCatgoryController {
public List<MchCatgoryEntity> export(MchCatgoryEntity mchCatgory, Long[] ids) {
return mchCatgoryService.list(Wrappers.lambdaQuery(mchCatgory).in(ArrayUtil.isNotEmpty(ids), MchCatgoryEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.mch;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -10,6 +11,7 @@ import com.bsd.pjcloud.admin.api.dto.UserInfo;
import com.bsd.pjcloud.admin.api.entity.SysDept;
import com.bsd.pjcloud.admin.api.feign.RemoteDeptService;
import com.bsd.pjcloud.admin.api.feign.RemoteUserService;
import com.bsd.pjcloud.common.api.encrypt.annotation.encrypt.ApiEncryptAes;
import com.bsd.pjcloud.common.core.constant.enums.MerchantTypeEnum;
import com.bsd.pjcloud.common.core.constant.enums.YesNoEnum;
import com.bsd.pjcloud.common.core.util.R;
@@ -135,8 +137,10 @@ public class MchManageController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app查询商铺", description = "app查询商铺")
@ApiCryptoAes
@GetMapping("/app/page-join")
// @Inner(value = false)
@ApiEncryptAes
public R<Page<MchManageVo>> appPageJoin(@ParameterObject Page page, @ParameterObject MchManageDto dto) {
PjcloudUser user = SecurityUtils.getUser();
dto.setVisibleMobile(YesNoEnum.YES.getCode());
@@ -153,6 +157,7 @@ public class MchManageController {
}
@Operation(summary = "app查询合作商家的分店", description = "app查询合作商家的分店")
@ApiCryptoAes
@GetMapping("/app/children-page-join")
@Inner(value = false)
public R<Page<MchManageVo>> appParentPageJoin(@ParameterObject Page page, @ParameterObject MchManageDto dto) {
@@ -163,12 +168,14 @@ public class MchManageController {
}
@Operation(summary = "app查询店铺详情", description = "app查询店铺详情")
@ApiCryptoAes
@GetMapping("/app/detail")
public R<MchManageVo> appPageJoin(@RequestParam Long id) {
return R.ok(mchManageService.join(id));
}
@Operation(summary = "宁波银行登录", description = "宁波银行登录")
@ApiCryptoAes
@GetMapping("/app/lb-login")
public R<String> lbLogin() {
PjcloudUser user = SecurityUtils.getUser();
@@ -264,4 +271,4 @@ public class MchManageController {
public List<MchManageEntity> export(MchManageEntity mchManage, Long[] ids) {
return mchManageService.list(Wrappers.lambdaQuery(mchManage).in(ArrayUtil.isNotEmpty(ids), MchManageEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.mch;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -41,6 +42,7 @@ public class MchPaySettingController {
* 用户可以支付的方式(目前微信、支付宝)
*/
@Operation(summary = "用户可以支付的方式(目前微信、支付宝)", description = "用户可以支付的方式(目前微信、支付宝)")
@ApiCryptoAes
@GetMapping("/app/pay-type-list")
public R<List<MchPaySettingVo>> getUserPaySettingList() {
System.out.println("getUserPaySettingList");
@@ -102,4 +104,4 @@ public class MchPaySettingController {
public R removeById(@RequestBody Long[] ids) {
return R.ok(mchPaySettingService.removeBatchByIds(CollUtil.toList(ids)));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.mch;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -50,6 +51,7 @@ public class MchPickUpController {
/* ************************************* start app start ************************************* */
@Operation(summary = "分页查询", description = "分页查询")
@ApiCryptoAes
@GetMapping("/app/page")
public R<Page<MchPickUpVo>> appPage(@ParameterObject Page page, @ParameterObject MchPickUpDto dto) {
dto.setStatus(WalletMchPickUpStatusEnum.COOPERATION_SUCCESS.getCode());
@@ -57,6 +59,7 @@ public class MchPickUpController {
}
@Operation(summary = "查询详情", description = "查询详情")
@ApiCryptoAes
@GetMapping("/app/detail")
public R<MchPickUpVo> appDetail(@RequestParam("id") Long id) {
return R.ok(mchPickUpService.join(id));
@@ -110,4 +113,4 @@ public class MchPickUpController {
public List<MchPickUpEntity> export(MchPickUpEntity mchPickUp, Long[] ids) {
return mchPickUpService.list(Wrappers.lambdaQuery(mchPickUp).in(ArrayUtil.isNotEmpty(ids), MchPickUpEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.recharge;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -54,6 +55,7 @@ public class WalletRechargeController {
/* ************************************* start app start ************************************* */
@Operation(summary = "模拟充值", description = "模拟充值")
@ApiCryptoAes
@PostMapping("/app/create")
public R<WalletRechargeEntity> appRecharge(@RequestBody WalletAppRechargeDto dto) {
return R.ok(walletRechargeService.createWalletRecharge(dto));
@@ -112,4 +114,4 @@ public class WalletRechargeController {
public List<WalletRechargeEntity> export(WalletRechargeEntity walletRecharge, Long[] ids) {
return walletRechargeService.list(Wrappers.lambdaQuery(walletRecharge).in(ArrayUtil.isNotEmpty(ids), WalletRechargeEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.recharge;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -62,6 +63,7 @@ public class WalletRechargePackageController {
/* ************************************* start app start ************************************* */
@Operation(summary = "查询全部", description = "查询全部")
@ApiCryptoAes
@GetMapping("/app/list")
public R appList() {
LambdaQueryWrapper<WalletRechargePackageEntity> wrapper = new LambdaQueryWrapper<WalletRechargePackageEntity>()
@@ -126,4 +128,4 @@ public class WalletRechargePackageController {
public List<WalletRechargePackageEntity> export(WalletRechargePackageEntity walletRechargePackage, Long[] ids) {
return walletRechargePackageService.list(Wrappers.lambdaQuery(walletRechargePackage).in(ArrayUtil.isNotEmpty(ids), WalletRechargePackageEntity::getId, ids));
}
}
}
@@ -1,4 +1,5 @@
package com.bsd.pjcloud.wallet.controller.rule;
import com.bsd.pjcloud.common.api.encrypt.annotation.crypto.ApiCryptoAes;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.collection.CollUtil;
@@ -65,6 +66,7 @@ public class WalletRuleTransactionController {
/* ************************************* start app start ************************************* */
@Operation(summary = "app转账", description = "app转账")
@ApiCryptoAes
@PostMapping("/app/transfer-accounts")
@Idempotent(expireTime = 3, info = "正在处理中,请勿重复操作")
public R appTransferAccounts(@Validated(Group.APP.class) @RequestBody WalletRuleTransferAccountsDto body) {
@@ -148,4 +150,4 @@ public class WalletRuleTransactionController {
return R.ok(walletRuleTransactionService.removeBatchByIds(CollUtil.toList(ids)));
}
}
}