|
|
@@ -20,6 +20,7 @@ import { Public } from 'src/auth/public.decorator'
|
|
|
import { OperationLogService } from '../operation-log/operation-log.service'
|
|
|
import { OperationType } from '../operation-log/entities/operation-log.entity'
|
|
|
import { Role } from 'src/model/role.enum'
|
|
|
+import Decimal from 'decimal.js'
|
|
|
|
|
|
@ApiTags('users')
|
|
|
@Controller('users')
|
|
|
@@ -103,4 +104,15 @@ export class UsersController {
|
|
|
public async hasInvite(@Param('userId') userId: string) {
|
|
|
return await this.usersService.hasInvite(parseInt(userId))
|
|
|
}
|
|
|
+
|
|
|
+ @Get('/updateMaxSend/:userId/:maxSend')
|
|
|
+ public async updateMaxSend(@Req() req, @Param('userId') userId: number, @Param('maxSend') value: number) {
|
|
|
+ const users = await this.usersService.updateMaxSend(userId, value)
|
|
|
+ if (users) {
|
|
|
+ await this.operationLogService.create(req, users, 'Users', OperationType.UPDATE, '修改最大发送数', users.maxSend)
|
|
|
+ return 'update maxSend success!'
|
|
|
+ } else {
|
|
|
+ return 'update maxSend fail!'
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|