【同步】BOOT 和 CLOUD 的功能
parent
a9fe595823
commit
2ba141a5c4
|
@ -77,7 +77,6 @@ public class BpmProcessDefinitionController {
|
||||||
@GetMapping ("/list")
|
@GetMapping ("/list")
|
||||||
@Operation(summary = "获得流程定义列表")
|
@Operation(summary = "获得流程定义列表")
|
||||||
@Parameter(name = "suspensionState", description = "挂起状态", required = true, example = "1") // 参见 Flowable SuspensionState 枚举
|
@Parameter(name = "suspensionState", description = "挂起状态", required = true, example = "1") // 参见 Flowable SuspensionState 枚举
|
||||||
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
|
|
||||||
public CommonResult<List<BpmProcessDefinitionRespVO>> getProcessDefinitionList(
|
public CommonResult<List<BpmProcessDefinitionRespVO>> getProcessDefinitionList(
|
||||||
@RequestParam("suspensionState") Integer suspensionState) {
|
@RequestParam("suspensionState") Integer suspensionState) {
|
||||||
List<ProcessDefinition> list = processDefinitionService.getProcessDefinitionListBySuspensionState(suspensionState);
|
List<ProcessDefinition> list = processDefinitionService.getProcessDefinitionListBySuspensionState(suspensionState);
|
||||||
|
@ -96,7 +95,6 @@ public class BpmProcessDefinitionController {
|
||||||
@Operation(summary = "获得流程定义")
|
@Operation(summary = "获得流程定义")
|
||||||
@Parameter(name = "id", description = "流程编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "流程编号", required = true, example = "1024")
|
||||||
@Parameter(name = "key", description = "流程定义标识", required = true, example = "1024")
|
@Parameter(name = "key", description = "流程定义标识", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('bpm:process-definition:query')")
|
|
||||||
public CommonResult<BpmProcessDefinitionRespVO> getProcessDefinition(
|
public CommonResult<BpmProcessDefinitionRespVO> getProcessDefinition(
|
||||||
@RequestParam(value = "id", required = false) String id,
|
@RequestParam(value = "id", required = false) String id,
|
||||||
@RequestParam(value = "key", required = false) String key) {
|
@RequestParam(value = "key", required = false) String key) {
|
||||||
|
@ -105,10 +103,11 @@ public class BpmProcessDefinitionController {
|
||||||
if (processDefinition == null) {
|
if (processDefinition == null) {
|
||||||
return success(null);
|
return success(null);
|
||||||
}
|
}
|
||||||
|
BpmProcessDefinitionInfoDO processDefinitionInfo = processDefinitionService.getProcessDefinitionInfo(processDefinition.getId());
|
||||||
BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(processDefinition.getId());
|
BpmnModel bpmnModel = processDefinitionService.getProcessDefinitionBpmnModel(processDefinition.getId());
|
||||||
List<UserTask> userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel);
|
List<UserTask> userTaskList = BpmTaskCandidateStartUserSelectStrategy.getStartUserSelectUserTaskList(bpmnModel);
|
||||||
return success(BpmProcessDefinitionConvert.INSTANCE.buildProcessDefinition(
|
return success(BpmProcessDefinitionConvert.INSTANCE.buildProcessDefinition(
|
||||||
processDefinition, null, null, null, null, bpmnModel, userTaskList));
|
processDefinition, null, processDefinitionInfo, null, null, bpmnModel, userTaskList));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,8 @@ public interface BpmProcessInstanceConvert {
|
||||||
BpmProcessInstanceRespVO respVO = vpPageResult.getList().get(i);
|
BpmProcessInstanceRespVO respVO = vpPageResult.getList().get(i);
|
||||||
respVO.setStatus(FlowableUtils.getProcessInstanceStatus(pageResult.getList().get(i)));
|
respVO.setStatus(FlowableUtils.getProcessInstanceStatus(pageResult.getList().get(i)));
|
||||||
MapUtils.findAndThen(processDefinitionMap, respVO.getProcessDefinitionId(),
|
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()));
|
MapUtils.findAndThen(categoryMap, respVO.getCategory(), category -> respVO.setCategoryName(category.getName()));
|
||||||
respVO.setTasks(BeanUtils.toBean(taskMap.get(respVO.getId()), BpmProcessInstanceRespVO.Task.class));
|
respVO.setTasks(BeanUtils.toBean(taskMap.get(respVO.getId()), BpmProcessInstanceRespVO.Task.class));
|
||||||
// user
|
// user
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<if test="endTime != null">
|
<if test="endTime != null">
|
||||||
AND in_time < #{endTime}
|
AND in_time < #{endTime}
|
||||||
</if>
|
</if>
|
||||||
|
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
|
||||||
AND deleted = 0) -
|
AND deleted = 0) -
|
||||||
(SELECT IFNULL(SUM(total_price), 0)
|
(SELECT IFNULL(SUM(total_price), 0)
|
||||||
FROM erp_purchase_return
|
FROM erp_purchase_return
|
||||||
|
@ -17,6 +18,7 @@
|
||||||
<if test="endTime != null">
|
<if test="endTime != null">
|
||||||
AND return_time < #{endTime}
|
AND return_time < #{endTime}
|
||||||
</if>
|
</if>
|
||||||
|
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
|
||||||
AND deleted = 0)
|
AND deleted = 0)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
<if test="endTime != null">
|
<if test="endTime != null">
|
||||||
AND out_time < #{endTime}
|
AND out_time < #{endTime}
|
||||||
</if>
|
</if>
|
||||||
|
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
|
||||||
AND deleted = 0) -
|
AND deleted = 0) -
|
||||||
(SELECT IFNULL(SUM(total_price), 0)
|
(SELECT IFNULL(SUM(total_price), 0)
|
||||||
FROM erp_sale_return
|
FROM erp_sale_return
|
||||||
|
@ -17,6 +18,7 @@
|
||||||
<if test="endTime != null">
|
<if test="endTime != null">
|
||||||
AND return_time < #{endTime}
|
AND return_time < #{endTime}
|
||||||
</if>
|
</if>
|
||||||
|
AND tenant_id = ${@cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder@getRequiredTenantId()}
|
||||||
AND deleted = 0)
|
AND deleted = 0)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ public class CouponServiceImpl implements CouponService {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (CouponDO coupon : list) {
|
for (CouponDO coupon : list) {
|
||||||
try {
|
try {
|
||||||
boolean success = getSelf().expireCoupon(coupon);
|
boolean success = expireCoupon(coupon);
|
||||||
if (success) {
|
if (success) {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,3 +7,8 @@ tenant-id: {{adminTenentId}}
|
||||||
GET {{baseUrl}}/trade/order/get-detail?id=21
|
GET {{baseUrl}}/trade/order/get-detail?id=21
|
||||||
Authorization: Bearer {{token}}
|
Authorization: Bearer {{token}}
|
||||||
tenant-id: {{adminTenentId}}
|
tenant-id: {{adminTenentId}}
|
||||||
|
|
||||||
|
### 获得交易订单的物流轨迹 => 成功
|
||||||
|
GET {{baseUrl}}/trade/order/get-express-track-list?id=21
|
||||||
|
Authorization: Bearer {{token}}
|
||||||
|
tenant-id: {{adminTenentId}}
|
|
@ -215,14 +215,13 @@ public class TradeOrderQueryServiceImpl implements TradeOrderQueryService {
|
||||||
* @return 物流轨迹
|
* @return 物流轨迹
|
||||||
*/
|
*/
|
||||||
@Cacheable(cacheNames = RedisKeyConstants.EXPRESS_TRACK, key = "#code + '-' + #logisticsNo + '-' + #receiverMobile",
|
@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) {
|
public List<ExpressTrackRespDTO> getExpressTrackList(String code, String logisticsNo, String receiverMobile) {
|
||||||
return expressClientFactory.getDefaultExpressClient().getExpressTrackList(
|
return expressClientFactory.getDefaultExpressClient().getExpressTrackList(
|
||||||
new ExpressTrackQueryReqDTO().setExpressCode(code).setLogisticsNo(logisticsNo)
|
new ExpressTrackQueryReqDTO().setExpressCode(code).setLogisticsNo(logisticsNo)
|
||||||
.setPhone(receiverMobile));
|
.setPhone(receiverMobile));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// =================== Order Item ===================
|
// =================== Order Item ===================
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue