fix api profileSalary
This commit is contained in:
parent
f7bde0608a
commit
e368c4cae8
1 changed files with 17 additions and 17 deletions
|
|
@ -113,14 +113,14 @@ export class ProfileSalaryController extends Controller {
|
|||
/**
|
||||
* API GetById ProfileSalary
|
||||
*
|
||||
* @summary GetById ProfileSalary
|
||||
* @summary GetById Profile
|
||||
*
|
||||
* @param {string} id Id ProfileSalaryId
|
||||
* @param {string} id Id ProfileId
|
||||
*/
|
||||
@Get("{id}")
|
||||
async GetById(@Path() id: string) {
|
||||
const profileSalary = await this.profileSalaryRepository.findOne({
|
||||
where: { id },
|
||||
const profileSalary = await this.profileSalaryRepository.find({
|
||||
where: { profileId:id },
|
||||
select: ["id", "date", "amount", "positionSalaryAmount", "mouthSalaryAmount", "profileId"],
|
||||
});
|
||||
if (!profileSalary) {
|
||||
|
|
@ -129,22 +129,22 @@ export class ProfileSalaryController extends Controller {
|
|||
return new HttpSuccess(profileSalary);
|
||||
}
|
||||
|
||||
/**
|
||||
* API GetLists profile salary
|
||||
*
|
||||
* @summary GetLists profile salary
|
||||
*
|
||||
*/
|
||||
@Get()
|
||||
async GetLists() {
|
||||
const profileSalary = await this.profileSalaryRepository.find({
|
||||
select: ["id", "date", "amount", "positionSalaryAmount", "mouthSalaryAmount", "profileId"],
|
||||
// /**
|
||||
// * API GetLists profile salary
|
||||
// *
|
||||
// * @summary GetLists profile salary
|
||||
// *
|
||||
// */
|
||||
// @Get()
|
||||
// async GetLists() {
|
||||
// const profileSalary = await this.profileSalaryRepository.find({
|
||||
// select: ["id", "date", "amount", "positionSalaryAmount", "mouthSalaryAmount", "profileId"],
|
||||
// order: { createdAt: "ASC" },
|
||||
});
|
||||
// });
|
||||
|
||||
// if (!profileSalary) {
|
||||
// return new HttpSuccess([]);
|
||||
// }
|
||||
return new HttpSuccess(profileSalary);
|
||||
}
|
||||
// return new HttpSuccess(profileSalary);
|
||||
// }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue