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
|
* API GetById ProfileSalary
|
||||||
*
|
*
|
||||||
* @summary GetById ProfileSalary
|
* @summary GetById Profile
|
||||||
*
|
*
|
||||||
* @param {string} id Id ProfileSalaryId
|
* @param {string} id Id ProfileId
|
||||||
*/
|
*/
|
||||||
@Get("{id}")
|
@Get("{id}")
|
||||||
async GetById(@Path() id: string) {
|
async GetById(@Path() id: string) {
|
||||||
const profileSalary = await this.profileSalaryRepository.findOne({
|
const profileSalary = await this.profileSalaryRepository.find({
|
||||||
where: { id },
|
where: { profileId:id },
|
||||||
select: ["id", "date", "amount", "positionSalaryAmount", "mouthSalaryAmount", "profileId"],
|
select: ["id", "date", "amount", "positionSalaryAmount", "mouthSalaryAmount", "profileId"],
|
||||||
});
|
});
|
||||||
if (!profileSalary) {
|
if (!profileSalary) {
|
||||||
|
|
@ -129,22 +129,22 @@ export class ProfileSalaryController extends Controller {
|
||||||
return new HttpSuccess(profileSalary);
|
return new HttpSuccess(profileSalary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* API GetLists profile salary
|
// * API GetLists profile salary
|
||||||
*
|
// *
|
||||||
* @summary GetLists profile salary
|
// * @summary GetLists profile salary
|
||||||
*
|
// *
|
||||||
*/
|
// */
|
||||||
@Get()
|
// @Get()
|
||||||
async GetLists() {
|
// async GetLists() {
|
||||||
const profileSalary = await this.profileSalaryRepository.find({
|
// const profileSalary = await this.profileSalaryRepository.find({
|
||||||
select: ["id", "date", "amount", "positionSalaryAmount", "mouthSalaryAmount", "profileId"],
|
// select: ["id", "date", "amount", "positionSalaryAmount", "mouthSalaryAmount", "profileId"],
|
||||||
// order: { createdAt: "ASC" },
|
// order: { createdAt: "ASC" },
|
||||||
});
|
// });
|
||||||
|
|
||||||
// if (!profileSalary) {
|
// if (!profileSalary) {
|
||||||
// return new HttpSuccess([]);
|
// return new HttpSuccess([]);
|
||||||
// }
|
// }
|
||||||
return new HttpSuccess(profileSalary);
|
// return new HttpSuccess(profileSalary);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue