Explorar o código

refactor(task): 修改获取任务费用的方式

- 直接使用 task.total 作为需要发送的数量
wui hai 8 meses
pai
achega
45b552b62f
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/task/task.service.ts

+ 2 - 1
src/task/task.service.ts

@@ -1310,7 +1310,8 @@ export class TaskService implements OnModuleInit {
     }
     }
 
 
     async getCost(task: Task, user: Users) {
     async getCost(task: Task, user: Users) {
-        const number: number = await this.phoneListService.findCountByListId(task.listId)
+        // const number: number = await this.phoneListService.findCountByListId(task.listId)
+        const number = task.total
         // 费用 = 费率*需要发送量
         // 费用 = 费率*需要发送量
         // const rate = new Decimal(String(user.rate))
         // const rate = new Decimal(String(user.rate))
         // const num = new Decimal(String(number))
         // const num = new Decimal(String(number))