【同步】BOOT 和 CLOUD 的功能

pull/126/MERGE
YunaiV 2024-07-21 10:04:50 +08:00
parent a9fe595823
commit 2ba141a5c4
7 changed files with 15 additions and 7 deletions

View File

@ -77,7 +77,6 @@ public class BpmProcessDefinitionController {
@GetMapping ("/list")
@Operation(summary = "获得流程定义列表")
@Parameter(name = "suspensionState", description = "挂起状态", required = true, example = "1") // 参见 Flowable SuspensionState 枚举
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
public CommonResult<List<BpmProcessDefinitionRespVO>> getProcessDefinitionList(
@RequestParam("suspensionState") Integer suspensionState) {
List<ProcessDefinition> list = processDefinitionService.getProcessDefinitionListBySuspensionState(suspensionState);
@ -96,7 +95,6 @@ public class BpmProcessDefinitionController {
@Operation(summary = "获得流程定义")
@Parameter(name = "id", description = "流程编号", required = true, example = "1024")
@Parameter(name = "key", description = "流程定义标识", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
public CommonResult<BpmProcessDefinitionRespVO> getProcessDefinition(
@RequestParam(value = "id", required = false) String id,
@RequestParam(value = "key", required = false) String key) {
@ -105,10 +103,11 @@ public class BpmProcessDefinitionController {
if (processDefinition == null) {
return success(null);
}
BpmProcessDefinitionInfoDO processDefinitionInfo = processDefinitionService.getProcessDefinitionInfo(processDefinition.getId());
BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(processDefinition.getId());
List<UserTask> userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel);
return success(BpmProcessDefinitionConvert.INSTANCE.buildProcessDefinition(
processDefinition, null, null, null, null, bpmnModel, userTaskList));
processDefinition, null, processDefinitionInfo, null, null, bpmnModel, userTaskList));
}
}

View File

@ -47,7 +47,8 @@ public interface BpmProcessInstanceConvert {
BpmProcessInstanceRespVO respVO = vpPageResult.getList().get(i);
respVO.setStatus(FlowableUtils.getProcessInstanceStatus(pageResult.getList().get(i)));
MapUtils.findAndThen(processDefinitionMap, respVO.getProcessDefinitionId(),
processDefinition -> respVO.setCategory(processDefinition.getCategory()));
processDefinition -> respVO.setCategory(processDefinition.getCategory())
.setProcessDefinition(BeanUtils.toBean(processDefinition, BpmProcessDefinitionRespVO.class)));
MapUtils.findAndThen(categoryMap, respVO.getCategory(), category -> respVO.setCategoryName(category.getName()));
respVO.setTasks(BeanUtils.toBean(taskMap.get(respVO.getId()), BpmProcessInstanceRespVO.Task.class));
// user

View File

@ -10,6 +10,7 @@
<if test="endTime != null">
AND in_time &lt; #{endTime}
</if>
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
AND deleted = 0) -
(SELECT IFNULL(SUM(total_price), 0)
FROM erp_purchase_return
@ -17,6 +18,7 @@
<if test="endTime != null">
AND return_time &lt; #{endTime}
</if>
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
AND deleted = 0)
</select>

View File

@ -10,6 +10,7 @@
<if test="endTime != null">
AND out_time &lt; #{endTime}
</if>
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
AND deleted = 0) -
(SELECT IFNULL(SUM(total_price), 0)
FROM erp_sale_return
@ -17,6 +18,7 @@
<if test="endTime != null">
AND return_time &lt; #{endTime}
</if>
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
AND deleted = 0)
</select>

View File

@ -215,7 +215,7 @@ public class CouponServiceImpl implements CouponService {
int count = 0;
for (CouponDO coupon : list) {
try {
boolean success = getSelf().expireCoupon(coupon);
boolean success = expireCoupon(coupon);
if (success) {
count++;
}

View File

@ -7,3 +7,8 @@ tenant-id: {{adminTenentId}}
GET {{baseUrl}}/trade/order/get-detail?id=21
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
### 获得交易订单的物流轨迹 => 成功
GET {{baseUrl}}/trade/order/get-express-track-list?id=21
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}

View File

@ -215,14 +215,13 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
* @return
*/
@Cacheable(cacheNames = RedisKeyConstants.EXPRESS_TRACK, key = "#code + '-' + #logisticsNo + '-' + #receiverMobile",
condition = "#result != null")
condition = "#result != null && #result.length() > 0")
public List<ExpressTrackRespDTO> getExpressTrackList(String code, String logisticsNo, String receiverMobile) {
return expressClientFactory.getDefaultExpressClient().getExpressTrackList(
new ExpressTrackQueryReqDTO().setExpressCode(code).setLogisticsNo(logisticsNo)
.setPhone(receiverMobile));
}
// =================== Order Item ===================
@Override