PAMapp/components/AddAndReservedBtns.vue
@@ -14,6 +14,8 @@ import { Vue, Component, Prop, Emit, Action, State, namespace } from 'nuxt-property-decorator'; import { Consultant } from '~/shared/models/consultant.model'; const roleStorage = namespace('localStorage'); @Component export default class AddAndReservedBtns extends Vue { @@ -29,6 +31,9 @@ @Prop() cusClass!: string; @roleStorage.Getter isUserLogin!: boolean; isVisiblePopUp = false; ////////////////////////////////////////////////////////////////////// @@ -41,6 +46,12 @@ ////////////////////////////////////////////////////////////////////// addConsultant(item: Consultant): void { if (!this.isUserLogin) { item = { ...item, updateTime: new Date().toISOString() }; } this.addToMyConsultantList(item).then(addOk => { addOk && this.openPopUp(); }); PAMapp/components/Client/ClientCard.vue
@@ -77,12 +77,12 @@ v-else-if="client.communicateStatus === contactStatus.CONTACTED"> çµæ¡ </div> <div <!-- <div class="invite-msg smTxt_bold" @click.stop="inviteReview" v-else-if="!client.satisfactionScore"> ç¼é滿æåº¦ </div> </div> --> <div class="date xsTxt text--black" PAMapp/components/Interview/InterviewMsg.vue
@@ -102,11 +102,12 @@ } addInterview() { const message = this.getMessage(); const appointmentInformation: ToInformAppointment = { appointmentId: this.client.id, email : this.client?.email, interviewDate: this.interviewTime, message : this.interviewTxt, message, phone : this.client?.phone, }; appointmentService.informAppointment(appointmentInformation).then((_) => { @@ -121,6 +122,20 @@ this.getMyAppointmentList(); } private getMessage(): string { const targetDate = new Date(this.interviewTime); const interviewTime = `${targetDate.getFullYear()}å¹´${targetDate.getMonth() + 1}æ${targetDate.getDate()}æ¥ ${targetDate.getHours()}æ${targetDate.getMinutes()}å`; let result = ''; if(this.loginConsultant.phoneNumber && this.loginConsultant.email) { result = "æ¨å¥½ï¼ææ¯ä¿èª åªåå¹³å°çä¿éªé¡§å" + this.loginConsultant.name + "ï¼æè¬æ¨çé ç´ï¼æé è¨æå¨ä¸è¿°çæéèæ¨è¯ç¹«"+"\n" + interviewTime + "\n" +"以䏿¯æçé»è©±è碼/Emailï¼"+"\n" + this.loginConsultant.phoneNumber + "\n" + this.loginConsultant.email + "\n"+"è¥æ¤æé䏿¹ä¾¿ï¼è«èæè¯ç¹«ï¼è¬è¬ï¼"} else if (!this.loginConsultant.phoneNumber && this.loginConsultant.email) { result = "æ¨å¥½ï¼ææ¯ä¿èª åªåå¹³å°çä¿éªé¡§å" + this.loginConsultant.name + "ï¼æè¬æ¨çé ç´ï¼æé è¨æå¨ä¸è¿°çæéèæ¨è¯ç¹«"+"\n" + interviewTime + "\n" +"以䏿¯æçEmailï¼"+"\n" + this.loginConsultant.email + "\n"+"è¥æ¤æé䏿¹ä¾¿ï¼è«èæè¯ç¹«ï¼è¬è¬ï¼" } else { result = "æ¨å¥½ï¼ææ¯ä¿èª åªåå¹³å°çä¿éªé¡§å" + this.loginConsultant.name + "ï¼æè¬æ¨çé ç´ï¼æé è¨æå¨ä¸è¿°çæéèæ¨è¯ç¹«"+"\n" + interviewTime + "\n" +"以䏿¯æçé»è©±è碼ï¼"+"\n" + this.loginConsultant.phoneNumber + "\n"+"è¥æ¤æé䏿¹ä¾¿ï¼è«èæè¯ç¹«ï¼è¬è¬ï¼" } return result; } get isBtnDisabled() :Boolean { const isFormValid = this.client.phone ? this.interviewTxt && this.interviewTime :this.interviewTxt return !isFormValid PAMapp/nuxt.config.js
@@ -72,6 +72,7 @@ }, router: { base: process.env.ENV === 'uat' ? '/pam/' : '', mode: 'hash', middleware: ['getUrlQuery', 'errorRoute'] } } PAMapp/pages/agentInfo/_agentNo.vue
@@ -1,5 +1,5 @@ <template> <div> <div v-if="!!agentInfo"> <el-row type="flex" justify="center"> @@ -32,6 +32,15 @@ class="pam-paragraph"> <UiField :span="12" icon="phone" label="ææ©è碼"> {{ agentInfo.phoneNumber }} </UiField> </el-row> <el-row v-if="currentRole === role.ADMIN" type="flex" class="pam-paragraph"> <UiField :span="12" icon="comment" label="ä¿¡ç®±"> {{ agentInfo.email }} </UiField> </el-row> @@ -104,22 +113,9 @@ <el-row type="flex" class="pam-paragraph"> <el-col :span="24" class="pam-field"> <div class="pam-field__label pam-progress__label"> <div> <div class="pam-field__title"> <i class="pam-icon icon-thumbs-up" ></i>è«®è©¢åº¦è¡¨ç¾ <i class="pl-5 text--primary icon-information" @click="alertFieldInfo('evaluation')"></i> </div> </div> <div class="xsTxt"> {{ agentInfo.evaluation }}/50 (è¿ä¸åæ/ç´¯è¨) </div> </div> <div class="pam-field__content pam-field-evaluation pt-10"> <el-progress :show-text="false" :stroke-width="15" :percentage="agentInfo.evaluation * 2"></el-progress> </div> </el-col> <UiField icon="thumbs-up" label="諮詢度表ç¾"> {{ agentInfo.nearlyMonthAppointmentCount || 0 }} / {{ agentInfo.allAppointmentCount || 0 }} (è¿ä¸åæ/ç´¯è¨) </UiField> </el-row> <div class="consultant-edit-btn"> @@ -264,11 +260,13 @@ } get agentName(): string { return `${this.agentInfo.name}(${this.agentInfo.role})`; if (!this.agentInfo) return ''; return `${this.agentInfo?.name}(${this.agentInfo?.role})`; } get displayCommunicationStyleList(): string[] { return this.agentInfo.communicationStyle.split('ã').filter((item) => item); if (!this.agentInfo) return []; return this.agentInfo?.communicationStyle.split('ã').filter((item) => item); } } PAMapp/pages/agentInfo/edit/_agentNo.vue
@@ -1,5 +1,5 @@ <template> <div class="edit-agent-info-page"> <div class="edit-agent-info-page" v-if="!!agentInfo"> <el-row type="flex" @@ -64,6 +64,27 @@ :class="{'is-invalid': !phoneValid}" maxlength="10" minlength="10"></el-input> </div> </el-col> </el-row> <el-row type="flex" class="pam-paragraph"> <el-col :span="24" class="pam-field"> <div class="pam-field__label pam-progress__label"> <div> <div class="pam-field__title mb-10"> <i class="pam-icon icon-comment" ></i>ä¿¡ç®± <span class="hint text--bold" v-show="!emailValid">ä¿¡ç®±æ ¼å¼æèª¤</span> <span class="hint text--bold" v-show="editInfoValue.email.length === 0">ä¿¡ç®±çºå¿ å¡«</span> </div> </div> <el-input v-model="editInfoValue.email" :class="{'is-invalid': !emailValid}" ></el-input> </div> </el-col> </el-row> @@ -294,7 +315,8 @@ awards : '', communicationStyle: [] as string[], photoBase64 : '', phoneNumber : '' phoneNumber : '', email : '', }; communicationStyleList: string[] = agentCommunicationStyleList; @@ -375,7 +397,8 @@ experiences : agentInfo.experiences || '', awards : agentInfo.awards || '', communicationStyle: agentInfo.communicationStyle || '', photoBase64 : '' photoBase64 : '', email : agentInfo.email || '' }; this.editInfoValue = { @@ -386,14 +409,17 @@ } } ////////////////////////////////////////////////////////////////////// editAgentInfoSetting(): void { console.log('???', this.editInfoValue) const editSettingInfo: any = { ...this.editInfoValue, communicationStyle: this.editInfoValue.communicationStyle.join('ã'), serveArea: this.editInfoValue.serveArea.join('ã'), } }; console.log('!!!', editSettingInfo); accountSettingService.editAgentInfoSetting(editSettingInfo).then((res: AgentInfoSetting) => { this.isInfoUpdate = true; this.updateConsultantDetail(editSettingInfo.agentNo); @@ -437,6 +463,11 @@ : true; } get emailValid() { const rule = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/; return this.editInfoValue.email ? rule.test(this.editInfoValue.email) : true; } get isSubmitBtnDisabled(): boolean { const isFormValid = this.editInfoValue.name && this.editInfoValue.title @@ -447,7 +478,8 @@ && this.editInfoValue.phoneNumber.length && this.editInfoValue.seniorityYear && this.editInfoValue.expertise.length && this.editInfoValue.communicationStyle.length; && this.editInfoValue.communicationStyle.length && this.editInfoValue.email.length; return !isFormValid } } PAMapp/pages/appointment/_appointmentId/close/index.vue
@@ -17,7 +17,7 @@ class="pam-paragraph" style="flex-direction: column"> <UiField label="身åèåè/å± çèåè" :labelSize="20" class="required"> <input class="appointment-client-detail-close__input" class="appointment-client-detail-close__input mt-10" :class="{'is-invalid':!identityIdValid}" v-model="appointmentCloseInfo.policyholderIdentityId" placeholder="è«è¼¸å ¥" @@ -33,7 +33,7 @@ class="pam-paragraph"> <UiField label="åå代碼Plan Code" :labelSize="20" class="required"> <input class="appointment-client-detail-close__input" class="appointment-client-detail-close__input mt-10" v-model="appointmentCloseInfo.planCode" placeholder="è«è¼¸å ¥" type="text"> @@ -46,6 +46,7 @@ <UiField label="é²ä»¶æé" :labelSize="20" class="required"> <DateTimePicker :defaultValue="appointmentCloseInfo.policyEntryDate" class="mt-10" @changeDateTime="appointmentCloseDate = $event"></DateTimePicker> </UiField> </el-row> @@ -56,7 +57,7 @@ class="pam-paragraph"> <UiField label="æªæäº¤åå " :labelSize="20" class="required"> <UiSelect :closeReason.sync="appointmentCloseInfo.closedReason" :options="appointmentFailReason"/> :options="appointmentFailReason" class="mt-10"/> </UiField> <input v-if="appointmentCloseInfo.closedReason === 'other' @@ -73,6 +74,7 @@ class="pam-paragraph"> <UiField label="å註" :labelSize="20"> <el-input class="mt-10" type="textarea" :rows="3" placeholder="è«è¼¸å ¥" PAMapp/pages/appointment/_appointmentId/index.vue
@@ -1,5 +1,5 @@ <template> <div class="appointment-client-detail-page"> <div class="appointment-client-detail-page" v-if="!!appointmentDetail"> <div class="date-detail"> <div>{{ appointmentDetail.appointmentDate | formatDate }}é ç´</div> <div>{{ appointmentDetail.consultantReadTime | formatDate }} @@ -55,9 +55,9 @@ </div> </div> <div class=" btn-center" v-if="showWhenAppointmentHasClosed"> <!-- <div class=" btn-center" v-if="showWhenAppointmentHasClosed"> <el-button @click="inviteReview">ç¼é滿æåº¦</el-button> </div> </div> --> <div class="client-detail-action" v-if="showWhenAppointmentHasContacted"> <el-button @click="closeAppointment" class="desktop-client-detail-action-btn" >çµæ¡</el-button> PAMapp/pages/communication/consult.vue
Àɮפw§R°£ PAMapp/pages/communication/index.vue
Àɮפw§R°£ PAMapp/pages/communication/myDemand.vue
Àɮפw§R°£ PAMapp/pages/questionnaire/_agentNo.vue
@@ -336,7 +336,6 @@ private setMyRequest(): void { const storageMyRequest = getRequestsFromStorage(); const storageMyRequirement = this.recommendConsultantItem ? JSON.parse(this.recommendConsultantItem).requirements:[]; const contactTypePromise = accountSettingService.getUserAccountSetting(); if (storageMyRequest) { this.myRequest = { @@ -358,12 +357,15 @@ removeRequestQuestionFromStorage(); } contactTypePromise.then((contactTypeDetail) => { if (authService.isUserLogin()) { accountSettingService.getUserAccountSetting().then((contactTypeDetail) => { this.myRequest = { ...this.myRequest, ...contactTypeDetail } }) } } @@ -433,7 +435,7 @@ if (this.isEditBtn) { this.editAppointmentDemand(); } else { queryConsultantService.addFavoriteConsultant([this.$route.params.agentNo]).then(res => this.sentAppointmentDemand()); queryConsultantService.addFavoriteConsultant([{ agentNo: this.$route.params.agentNo, createdTime: new Date().toISOString()}]).then(res => this.sentAppointmentDemand()); } const editSettingInfo: UserSetting = { name: this.myRequest.name, PAMapp/pages/recommendConsultant/criteria.vue
Àɮפw§R°£ PAMapp/shared/const/hide-reviews.ts
@@ -1 +1 @@ export const hideReviews = false; export const hideReviews = true; PAMapp/shared/const/quickFilter-questionList.ts
@@ -12,12 +12,12 @@ ], type: 'radio' }, { name: 'avgScore', title: 'é¡§åæ»¿æåº¦', detail: [], type: '' }, // { // name: 'avgScore', // title: 'é¡§åæ»¿æåº¦', // detail: [], // type: '' // }, { name: 'communicationStyles', title: 'æºéé¢¨æ ¼', PAMapp/shared/models/account.model.ts
@@ -21,4 +21,5 @@ awards : string; communicationStyle: string; photoBase64 : string; email : string; } PAMapp/shared/services/query-consultant.service.ts
@@ -23,8 +23,11 @@ } // å å ¥é¡§å async addFavoriteConsultant(agentNoList: string[]) { return http.post('/consultant/favorite', { agentNoList }); async addFavoriteConsultant(addFavoriteConsultantList: AddFavoriteConsultantItem[]) { const payload = { consultantList: addFavoriteConsultantList }; return http.post('/consultant/favorite', payload); } // é ç´åè©¢å @@ -35,3 +38,8 @@ } export default new QueryConsultantService(); export interface AddFavoriteConsultantItem { agentNo : string; createdTime: string; } PAMapp/store/index.ts
@@ -1,7 +1,7 @@ import { Module, VuexModule, Mutation, Action } from 'vuex-module-decorators' import myConsultantService from '~/shared/services/my-consultant.service'; import queryConsultantService from '~/shared/services/query-consultant.service'; import queryConsultantService, { AddFavoriteConsultantItem } from '~/shared/services/query-consultant.service'; import reviewsService from '~/shared/services/reviews.service'; import { Consultant } from '~/shared/models/consultant.model'; import { getFavoriteFromStorage, setFavoriteToStorage } from '~/shared/storageConsultant'; @@ -78,8 +78,8 @@ if (localData?.length) { const agentNoList = localData.map(i => i.agentNo) await queryConsultantService.addFavoriteConsultant(agentNoList).then(res => { const addFavoriteAgentList: AddFavoriteConsultantItem[] = localData.map(i => ({ agentNo: i.agentNo, createdTime: i.updateTime})); await queryConsultantService.addFavoriteConsultant(addFavoriteAgentList).then(res => { localStorage.removeItem('favoriteConsultant') }) } @@ -114,7 +114,7 @@ if (!found) { const newData = [consultantToAdd].concat(this.myConsultantList); if (this.isUserLogin) { await queryConsultantService.addFavoriteConsultant([consultantToAdd.agentNo]) await queryConsultantService.addFavoriteConsultant([{ agentNo: consultantToAdd.agentNo, createdTime: consultantToAdd.updateTime }]) } else { setFavoriteToStorage(newData); } PAMapp/store/localStorage.ts
@@ -110,6 +110,9 @@ localStorage.removeItem('consultant_id'); localStorage.removeItem('appointment'); localStorage.removeItem('login_consultant'); localStorage.removeItem('notContactAppointmentIdFromMsg'); localStorage.removeItem('satisfactionIdFromMsg'); localStorage.removeItem('appointmentIdFromMsg'); this.id_token = localStorage.getItem('id_token'); this.current_role = localStorage.getItem('current_role'); this.consultant_id = localStorage.getItem('consultant_id'); pamapi/pom.xml
@@ -101,6 +101,11 @@ <dependencies> <dependency> <groupId>com.pollex.pam.business</groupId> <artifactId>PamBusiness</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <dependency> <groupId>tech.jhipster</groupId> <artifactId>jhipster-framework</artifactId> </dependency> @@ -344,6 +349,10 @@ <artifactId>wsdl4j</artifactId> <version>1.6.2</version> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> </dependency> <!-- pamapi/src/doc/sql/20220217_w.sql
¤ñ¹ï·sÀÉ®× @@ -0,0 +1,2 @@ ALTER TABLE public.consultant ADD status varchar NULL; UPDATE public.consultant SET status = 'AVAILABLE'; pamapi/src/doc/sql/20220221_w.sql
¤ñ¹ï·sÀÉ®× @@ -0,0 +1,21 @@ CREATE TABLE public.audit_logging ( id bigserial NOT NULL, functional_type varchar NULL, "content" varchar NULL, created_by varchar NULL, created_date timestamp NULL, CONSTRAINT audit_logging_pk PRIMARY KEY (id) ); ALTER TABLE public.consultant ADD latest_login_time timestamp NULL; update consultant set latest_login_time = (select login_date from login_record where account = 'A183619275' and login_method = 'E_SERVICE' and result = 'SUCCESS' order by login_date desc limit 1) where agent_no = 'A183619275'; update consultant set latest_login_time = (select login_date from login_record where account = 'AGAM11249699' and login_method = 'E_SERVICE' and result = 'SUCCESS' order by login_date desc limit 1) where agent_no = 'AGAM11249699'; update consultant set latest_login_time = (select login_date from login_record where account = 'Z152717443' and login_method = 'E_SERVICE' and result = 'SUCCESS' order by login_date desc limit 1) where agent_no = 'Z152717443'; update consultant set latest_login_time = (select login_date from login_record where account = 'D265260662' and login_method = 'E_SERVICE' and result = 'SUCCESS' order by login_date desc limit 1) where agent_no = 'D265260662'; update consultant set latest_login_time = (select login_date from login_record where account = 'AG0109051204' and login_method = 'E_SERVICE' and result = 'SUCCESS' order by login_date desc limit 1) where agent_no = 'AG0109051204'; update consultant set latest_login_time = (select login_date from login_record where account = 'B282677963' and login_method = 'E_SERVICE' and result = 'SUCCESS' order by login_date desc limit 1) where agent_no = 'B282677963'; update consultant set latest_login_time = (select login_date from login_record where account = 'AG0101234567' and login_method = 'E_SERVICE' and result = 'SUCCESS' order by login_date desc limit 1) where agent_no = 'AG0101234567'; update consultant set latest_login_time = (select login_date from login_record where account = 'X147309614' and login_method = 'E_SERVICE' and result = 'SUCCESS' order by login_date desc limit 1) where agent_no = 'X147309614'; update consultant set latest_login_time = (select login_date from login_record where account = 'J149388015' and login_method = 'E_SERVICE' and result = 'SUCCESS' order by login_date desc limit 1) where agent_no = 'J149388015'; update consultant set latest_login_time = (select login_date from login_record where account = 'R221444250' and login_method = 'E_SERVICE' and result = 'SUCCESS' order by login_date desc limit 1) where agent_no = 'R221444250'; pamapi/src/doc/ÅU°ÝAPI/±NÅU°Ý¥[¤J«È¤áªº²M³æ.txt
@@ -2,7 +2,16 @@ request body: { "agentNoList": ["12345"] "consultantList": [ { "agentNo": "Z152717443", "createdTime": "2020-05-18T03:24:40Z" // è¥çºnullæï¼å¾ç«¯èªå帶ç®åæå» }, { "agentNo": "AGAM11249699", "createdTime": "2020-05-18T03:24:42Z" } ... ] } response body: ç¡ï¼åhttp status 202 pamapi/src/doc/ÅU°ÝAPI/«ü©wÅU°Ý¸Ô²Ó¸ê°T.txt
@@ -8,11 +8,13 @@ "avgScore" : 3.1, "title" : "èç¶ç(DM)", "phoneNumber" : "0987168787", "email": "wayne@pollex.com.tw", "serveArea" : "åæç¸£ãé«éå¸ã屿±ç¸£", "companyAddress" : "è±è®ç¸£çéé®ä¸æ£è·¯30è9æ¨", "latestLoginTime" : "2021-12-24T08:48:21.497Z", "seniority" : "38 å¹´ ", "evaluation" : 50, "nearlyMonthAppointmentCount" : 30, è¿ä¸åæé ç´å®æ¸éï¼ç¨æ¼è«®è©¢åº¦ "allAppointmentCount" : 50, ææé ç´å®æ¸éï¼ç¨æ¼è«®è©¢åº¦ "expertise" : [ "å¥åº·èä¿é", "å女æè²", "è³ç¢è¦å", "æ¨æ´»éä¼", "ä¿å®å¥æª¢/è¦å", "åç´ ä¿å®" ], "concept" : "æ¯ä»½ä¿å®è¦åå¾ãå¿ãåºç¼\r\nç¨å¿ãç±å¿ãè²¼å¿å°å¾ æ¯ä½å®¢æ¶\r\n\r\næçä¸å¤§ä¿¡å¿µ\r\nâ é«cpå¼ ãä½ä¿è²»ãé«ä¿éã\r\nâ ç°¡å®å ãè¼é¬ãææä¿éªã\r\nâ 客製å ãé¸ä¸ä»½é©åçè¦åã\r\n\r\næä¾å®åçè¦åä¿è·æ¨åææç人", "experiences" : "麻ççå·¥å¸é¢æè³èéèå¸ç³»,æ¿å¤§EMBA,ä¸å大å¸è²¡éç³»,人身ä¿éªèç §,財ç¢ä¿éªèç §,æè³åä¿å®èç §,å¤å¹£æ¶ä»ä¿éªèç §,éä¼éé¡ç²¾ç®å¸«èç §,ç¢ç©ä¿éªï§¤è³ 人å¡èè©¦èæ¸,ç¾å壽éªç®¡ï§¤å¸«èæ¸,ç¾å壽éªï§¤è³ å¸«èæ¸,ç¾å財ç¢åæå¤éªæ¿ä¿å¸«èæ¸", pamapi/src/doc/ÅU°ÝAPI/½s¿è×§ïÅU°Ý¸ê®Æ.txt
@@ -15,6 +15,7 @@ "serveArea":"å°åå¸ã屿±ç¸£", "gender":"male", "phoneNumber":"09123456789", "email": "wayne@pollex.com.tw", "companyAddress":"å®è縣äºçµéä¸èè·¯3è3æ¨", "seniorityYear":40, "seniorityMonth":10, pamapi/src/main/java/com/pollex/pam/aop/logging/LoggingAspect.java
@@ -42,7 +42,7 @@ /** * Pointcut that matches all Spring beans in the application's main packages. */ @Pointcut("within(com.pollex.pam.repository..*)" + " || within(com.pollex.pam.service..*)" + " || within(com.pollex.pam.web.rest..*)") @Pointcut("within(com.pollex.pam.business.repository..*)" + " || within(com.pollex.pam.business.service..*)" + " || within(com.pollex.pam.web.rest..*)") public void applicationPackagePointcut() { // Method is empty as this is just a Pointcut, the implementations are in the advices. } pamapi/src/main/java/com/pollex/pam/appointment/process/AppointmentProcess.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/appointment/process/AppointmentProcessInterface.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/appointment/process/ClosedProcess.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/appointment/process/DoneProcess.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/config/ApplicationProperties.java
@@ -1,6 +1,9 @@ package com.pollex.pam.config; import com.pollex.pam.enums.SendEmailMsgMethod; import com.pollex.pam.business.config.AppProperties; import com.pollex.pam.business.config.SendEmailProperties; import com.pollex.pam.business.config.SendSMSProperties; import com.pollex.pam.business.enums.SendEmailMsgMethod; import org.springframework.boot.context.properties.ConfigurationProperties; /** @@ -10,7 +13,7 @@ * See {@link tech.jhipster.config.JHipsterProperties} for a good example. */ @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false) public class ApplicationProperties { public class ApplicationProperties implements AppProperties { private boolean mockLogin; private String otpWebServiceUrl; @@ -20,8 +23,8 @@ private String eServiceLoginFunc; private String eServiceLoginSys; private String frontEndDomain; private SMS sms; private Email email; private SendSMSProperties sms; private SendEmailProperties email; private String fileFolderPath; public boolean isMockLogin() { @@ -88,126 +91,22 @@ this.frontEndDomain = frontEndDomain; } public SMS getSms() { public SendSMSProperties getSms() { return sms; } public void setSms(SMS sms) { public void setSms(SendSMSProperties sms) { this.sms = sms; } public Email getEmail() { public SendEmailProperties getEmail() { return email; } public void setEmail(Email email) { public void setEmail(SendEmailProperties email) { this.email = email; } public static class SMS { private String url; private String sourceCode; private String sender; private String smsType; private String subject; private boolean sendNotifyMsg; public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getSourceCode() { return sourceCode; } public void setSourceCode(String sourceCode) { this.sourceCode = sourceCode; } public String getSender() { return sender; } public void setSender(String sender) { this.sender = sender; } public String getSmsType() { return smsType; } public void setSmsType(String smsType) { this.smsType = smsType; } public String getSubject() { return subject; } public void setSubject(String subject) { this.subject = subject; } public boolean isSendNotifyMsg() { return sendNotifyMsg; } public void setSendNotifyMsg(boolean sendNotifyMsg) { this.sendNotifyMsg = sendNotifyMsg; } } public static class Email { private String url; private String functionId; private String senderEmail; private boolean sendNotifyMsg; private SendEmailMsgMethod method; public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getFunctionId() { return functionId; } public void setFunctionId(String functionId) { this.functionId = functionId; } public String getSenderEmail() { return senderEmail; } public void setSenderEmail(String senderEmail) { this.senderEmail = senderEmail; } public boolean isSendNotifyMsg() { return sendNotifyMsg; } public void setSendNotifyMsg(boolean sendNotifyMsg) { this.sendNotifyMsg = sendNotifyMsg; } public SendEmailMsgMethod getMethod() { return method; } public void setMethod(SendEmailMsgMethod method) { this.method = method; } } public String getFileFolderPath() { return fileFolderPath; } pamapi/src/main/java/com/pollex/pam/config/CacheConfiguration.java
@@ -43,11 +43,11 @@ @Bean public JCacheManagerCustomizer cacheManagerCustomizer() { return cm -> { createCache(cm, com.pollex.pam.repository.UserRepository.USERS_BY_LOGIN_CACHE); createCache(cm, com.pollex.pam.repository.UserRepository.USERS_BY_EMAIL_CACHE); createCache(cm, com.pollex.pam.domain.User.class.getName()); createCache(cm, com.pollex.pam.domain.Authority.class.getName()); createCache(cm, com.pollex.pam.domain.User.class.getName() + ".authorities"); createCache(cm, com.pollex.pam.business.repository.UserRepository.USERS_BY_LOGIN_CACHE); createCache(cm, com.pollex.pam.business.repository.UserRepository.USERS_BY_EMAIL_CACHE); createCache(cm, com.pollex.pam.business.domain.User.class.getName()); createCache(cm, com.pollex.pam.business.domain.Authority.class.getName()); createCache(cm, com.pollex.pam.business.domain.User.class.getName() + ".authorities"); // jhipster-needle-ehcache-add-entry }; } pamapi/src/main/java/com/pollex/pam/config/Constants.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/config/DatabaseConfiguration.java
@@ -1,16 +1,12 @@ package com.pollex.pam.config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.transaction.annotation.EnableTransactionManagement; import tech.jhipster.config.JHipsterConstants; @Configuration @EnableJpaRepositories({ "com.pollex.pam.repository" }) @EnableJpaRepositories({"com.pollex.pam.business.repository"}) @EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware") @EnableTransactionManagement public class DatabaseConfiguration {} pamapi/src/main/java/com/pollex/pam/config/SecurityConfiguration.java
@@ -1,6 +1,6 @@ package com.pollex.pam.config; import com.pollex.pam.security.*; import com.pollex.pam.business.security.AuthoritiesConstants; import com.pollex.pam.security.jwt.*; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Import; pamapi/src/main/java/com/pollex/pam/config/WebsocketConfiguration.java
@@ -1,6 +1,6 @@ package com.pollex.pam.config; import com.pollex.pam.security.AuthoritiesConstants; import com.pollex.pam.business.security.AuthoritiesConstants; import java.security.Principal; import java.util.*; import org.springframework.context.annotation.Bean; pamapi/src/main/java/com/pollex/pam/config/WebsocketSecurityConfiguration.java
@@ -1,6 +1,6 @@ package com.pollex.pam.config; import com.pollex.pam.security.AuthoritiesConstants; import com.pollex.pam.business.security.AuthoritiesConstants; import org.springframework.context.annotation.Configuration; import org.springframework.messaging.simp.SimpMessageType; import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry; pamapi/src/main/java/com/pollex/pam/consts/SeniorityQueryConst.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/AbstractAuditingEntity.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/Appointment.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/AppointmentClosedInfo.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/AppointmentCustomerView.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/AppointmentExpiringNotifyRecord.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/AppointmentMemo.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/AppointmentNoticeLog.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/Authority.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/Consultant.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/Customer.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/CustomerFavoriteConsultant.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/InterviewRecord.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/LoginRecord.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/OtpTmp.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/PersonalNotification.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/Satisfaction.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/User.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/domain/package-info.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/AppointmentStatusEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/ConsultantDetailEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/ContactStatusEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/CustomerDetailEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/GenderEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/InterviewRecordStatusEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/LoginMethod.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/LoginResult.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/NotificationTypeEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/OtpLoginTypeEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/OtpTmpStatusEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/PersonalNotificationRoleEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/SatisfactionStatusEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/SatisfactionTypeEnum.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/enums/SendEmailMsgMethod.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/AppointmentClosedInfoRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/AppointmentCustomerViewRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/AppointmentExpiringNotifyRecordRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/AppointmentMemoRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/AppointmentNoticeLogRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/AppointmentRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/AuthorityRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/ConsultantRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/CustomerFavoriteConsultantRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/CustomerRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/InterviewRecordRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/LoginRecordRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/OtpTmpRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/PersonalNotificationRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/SatisfactionRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/UserRepository.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/repository/package-info.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/security/AuthoritiesConstants.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/security/DomainUserDetailsService.java
@@ -1,7 +1,7 @@ package com.pollex.pam.security; import com.pollex.pam.domain.User; import com.pollex.pam.repository.UserRepository; import com.pollex.pam.business.domain.User; import com.pollex.pam.business.repository.UserRepository; import java.util.*; import java.util.stream.Collectors; import org.hibernate.validator.internal.constraintvalidators.hv.EmailValidator; pamapi/src/main/java/com/pollex/pam/security/SecurityUtils.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/security/SpringSecurityAuditorAware.java
@@ -1,7 +1,9 @@ package com.pollex.pam.security; import com.pollex.pam.config.Constants; import com.pollex.pam.business.config.Constants; import java.util.Optional; import com.pollex.pam.business.security.SecurityUtils; import org.springframework.data.domain.AuditorAware; import org.springframework.stereotype.Component; pamapi/src/main/java/com/pollex/pam/security/provider/CustomAuthenticationProvider.java
@@ -1,7 +1,7 @@ package com.pollex.pam.security.provider; import com.pollex.pam.config.ApplicationProperties; import com.pollex.pam.security.token.EServiceAuthenticationToken; import com.pollex.pam.business.security.token.EServiceAuthenticationToken; import com.pollex.pam.security.token.OtpAuthenticationToken; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AbstractAuthenticationToken; pamapi/src/main/java/com/pollex/pam/security/provider/EServiceAuthenticationProvider.java
@@ -1,26 +1,19 @@ package com.pollex.pam.security.provider; import com.fasterxml.jackson.core.JsonProcessingException; import com.pollex.pam.business.domain.Consultant; import com.pollex.pam.business.enums.ConsultantDetailEnum; import com.pollex.pam.business.repository.ConsultantRepository; import com.pollex.pam.business.service.EServiceConnectService; import com.pollex.pam.business.service.dto.EServiceResponse; import com.pollex.pam.business.web.errors.ConsultantDisableException; import com.pollex.pam.business.config.AppProperties; import com.pollex.pam.business.security.token.EServiceAuthenticationToken; import com.pollex.pam.business.web.errors.EServiceErrorException; import com.pollex.pam.config.ApplicationProperties; import com.pollex.pam.domain.Consultant; import com.pollex.pam.enums.ConsultantDetailEnum; import com.pollex.pam.repository.ConsultantRepository; import com.pollex.pam.security.token.EServiceAuthenticationToken; import com.pollex.pam.service.LoginRecordService; import com.pollex.pam.service.dto.EServiceResponse; import com.pollex.pam.web.rest.errors.EServiceErrorException; import org.apache.http.conn.ssl.NoopHostnameVerifier; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.*; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; @@ -28,15 +21,8 @@ import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Component; import org.springframework.web.client.RestTemplate; import org.springframework.web.util.UriComponentsBuilder; import javax.net.ssl.SSLContext; import java.security.GeneralSecurityException; import java.security.KeyManagementException; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.cert.X509Certificate; import java.util.*; @Component @@ -46,48 +32,43 @@ private static final Logger log = LoggerFactory.getLogger(EServiceAuthenticationProvider.class); @Autowired ApplicationProperties applicationProperty; ApplicationProperties applicationProperties; @Autowired ConsultantRepository consultantRepository; @Autowired LoginRecordService loginRecordService; EServiceConnectService eServiceConnectService; public Authentication authenticate(EServiceAuthenticationToken authenticationToken) throws AuthenticationException { String account = authenticationToken.getPrincipal(); String credentials = authenticationToken.getCredentials(); if(applicationProperty.isMockLogin()){ loginRecordService.saveEServiceLoginSuccessRecord(account); return getConsultantToken(account, credentials); if(applicationProperties.isMockLogin()){ return getConsultantTokenAndRecordLoginTime(account, credentials); } try { ResponseEntity<EServiceResponse> responseEntity = loginByEService(account, credentials); ResponseEntity<EServiceResponse> responseEntity = eServiceConnectService.loginByEService(account, credentials); if(HttpStatus.OK.equals(responseEntity.getStatusCode())) { EServiceResponse eServiceResponse = responseEntity.getBody(); log.debug("eService response = {}", eServiceResponse); if(E_SERVICE_LOGIN_SUCCESS_CODE.equals(eServiceResponse.getIssuccess())){ loginRecordService.saveEServiceLoginSuccessRecord(account); return getConsultantToken(account, credentials); return getConsultantTokenAndRecordLoginTime(account, credentials); } else { loginRecordService.saveEServiceLoginFailRecord(account, eServiceResponse.getMsg()); throw new EServiceErrorException(eServiceResponse.getMsg()); } } throw new RuntimeException("eService http error!, response http status code = " + responseEntity.getStatusCode()); } catch (JsonProcessingException e) { throw new RuntimeException("convert to json processing error!"); } catch (GeneralSecurityException e) { throw new RuntimeException("General Security SSL error!"); } } private UsernamePasswordAuthenticationToken getConsultantToken(String account, String credential) { private UsernamePasswordAuthenticationToken getConsultantTokenAndRecordLoginTime(String account, String credential) throws ConsultantDisableException { Consultant consultant = consultantRepository.findOneByAgentNo(account).orElseThrow(() -> new UsernameNotFoundException("該顧åè³æä¸¦ä¸å卿¼åªåå¹³å°ç³»çµ±ä¸")); List<GrantedAuthority> grantedAuths = Arrays.asList(new SimpleGrantedAuthority("ROLE_USER")); @@ -100,50 +81,5 @@ authenticationToken.setDetails(details); return authenticationToken; } private ResponseEntity<EServiceResponse> loginByEService(String account, String paxxword) throws JsonProcessingException, GeneralSecurityException { RestTemplate restTemplate = getTrustAllRestTemplate(); settingMessageConvertersToSpecifyType(restTemplate, MediaType.ALL); String urlTemplate = UriComponentsBuilder.fromHttpUrl(applicationProperty.geteServiceLoginUrl()) .queryParam("func", applicationProperty.geteServiceLoginFunc()) .queryParam("id", account) .queryParam("pin", paxxword) .queryParam("pwd", paxxword) .queryParam("sys", applicationProperty.geteServiceLoginSys()) .queryParam("transactionId", UUID.randomUUID().toString()) .encode().toUriString(); log.debug("http get loginByEService, url = {}", urlTemplate); HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); HttpEntity<String> entity = new HttpEntity<>(headers); return restTemplate.exchange(urlTemplate, HttpMethod.GET, entity, EServiceResponse.class); } private RestTemplate getTrustAllRestTemplate() throws KeyStoreException, NoSuchAlgorithmException, KeyManagementException { SSLContext sslContext = SSLContexts.custom() .loadTrustMaterial(null, (X509Certificate[] x509Certs, String s) -> true) .build(); SSLConnectionSocketFactory csf = new SSLConnectionSocketFactory(sslContext, new NoopHostnameVerifier()); CloseableHttpClient httpClient = HttpClients.custom() .setSSLSocketFactory(csf) .build(); HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(); requestFactory.setHttpClient(httpClient); requestFactory.setConnectTimeout(300000); requestFactory.setReadTimeout(300000); return new RestTemplate(requestFactory); } private void settingMessageConvertersToSpecifyType(RestTemplate restTemplate, MediaType mediaType) { List<HttpMessageConverter<?>> messageConverters = new ArrayList<>(); MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); converter.setSupportedMediaTypes(Collections.singletonList(mediaType)); messageConverters.add(converter); restTemplate.setMessageConverters(messageConverters); } } pamapi/src/main/java/com/pollex/pam/security/provider/OtpAuthenticationProvider.java
@@ -1,6 +1,7 @@ package com.pollex.pam.security.provider; import com.pollex.pam.web.rest.errors.CustomerNotRegisteredException; import com.pollex.pam.business.web.errors.CustomerNotRegisteredException; import com.pollex.pam.security.token.OtpAuthenticationToken; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -8,13 +9,12 @@ import org.springframework.security.core.AuthenticationException; import org.springframework.stereotype.Component; import com.pollex.pam.domain.Customer; import com.pollex.pam.repository.CustomerRepository; import com.pollex.pam.security.token.OtpAuthenticationToken; import com.pollex.pam.business.domain.Customer; import com.pollex.pam.business.repository.CustomerRepository; import com.pollex.pam.service.CustomerAuthService; import com.pollex.pam.service.OtpTmpService; import com.pollex.pam.business.service.OtpTmpService; import com.pollex.pam.service.OtpUtilService; import com.pollex.pam.web.rest.vm.OtpAccount; import com.pollex.pam.business.web.vm.OtpAccount; @Component public class OtpAuthenticationProvider { pamapi/src/main/java/com/pollex/pam/security/token/EServiceAuthenticationToken.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/security/token/OtpAuthenticationToken.java
@@ -1,12 +1,9 @@ package com.pollex.pam.security.token; import com.pollex.pam.web.rest.vm.OtpAccount; import com.pollex.pam.business.web.vm.OtpAccount; import org.springframework.security.authentication.AbstractAuthenticationToken; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.SpringSecurityCoreVersion; import org.springframework.util.Assert; import java.util.Collection; public class OtpAuthenticationToken extends AbstractAuthenticationToken { pamapi/src/main/java/com/pollex/pam/service/AppointmentClosedInfoService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/AppointmentMemoService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/AppointmentNoticeLogService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/AppointmentService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/ConsultantQuerySpec.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/ConsultantService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/CustomerAuthService.java
@@ -15,12 +15,12 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.pollex.pam.domain.Customer; import com.pollex.pam.enums.CustomerDetailEnum; import com.pollex.pam.repository.CustomerRepository; import com.pollex.pam.business.domain.Customer; import com.pollex.pam.business.enums.CustomerDetailEnum; import com.pollex.pam.business.repository.CustomerRepository; import com.pollex.pam.security.jwt.TokenProvider; import com.pollex.pam.security.token.OtpAuthenticationToken; import com.pollex.pam.web.rest.vm.OtpAccount; import com.pollex.pam.business.web.vm.OtpAccount; @Service @Transactional pamapi/src/main/java/com/pollex/pam/service/CustomerService.java
@@ -2,21 +2,23 @@ import java.util.Optional; import com.pollex.pam.security.SecurityUtils; import com.pollex.pam.service.dto.CustomerDTO; import com.pollex.pam.service.mapper.CustomerMapper; import com.pollex.pam.business.security.SecurityUtils; import com.pollex.pam.business.service.OtpTmpService; import com.pollex.pam.business.service.UsernameAlreadyUsedException; import com.pollex.pam.business.service.dto.CustomerDTO; import com.pollex.pam.business.service.mapper.CustomerMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.pollex.pam.domain.Customer; import com.pollex.pam.domain.OtpTmp; import com.pollex.pam.enums.OtpLoginTypeEnum; import com.pollex.pam.enums.OtpTmpStatusEnum; import com.pollex.pam.repository.CustomerRepository; import com.pollex.pam.service.dto.CustomerRegisterDTO; import com.pollex.pam.service.mapper.CustomerDTOMapper; import com.pollex.pam.business.domain.Customer; import com.pollex.pam.business.domain.OtpTmp; import com.pollex.pam.business.enums.OtpLoginTypeEnum; import com.pollex.pam.business.enums.OtpTmpStatusEnum; import com.pollex.pam.business.repository.CustomerRepository; import com.pollex.pam.business.service.dto.CustomerRegisterDTO; import com.pollex.pam.business.service.mapper.CustomerDTOMapper; @Service @Transactional pamapi/src/main/java/com/pollex/pam/service/EmailAlreadyUsedException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/InterviewRecordService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/InvalidPasswordException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/LoginRecordService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/MailService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/NoticeService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/OtpTmpService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/OtpUtilService.java
@@ -1,17 +1,17 @@ package com.pollex.pam.service; import com.pollex.pam.domain.OtpTmp; import com.pollex.pam.enums.OtpTmpStatusEnum; import com.pollex.pam.web.rest.errors.OtpLoginFailException; import com.pollex.pam.web.rest.vm.VerifyOtpVM; import com.pollex.pam.business.domain.OtpTmp; import com.pollex.pam.business.enums.OtpTmpStatusEnum; import com.pollex.pam.business.service.OtpTmpService; import com.pollex.pam.business.web.errors.OtpLoginFailException; import com.pollex.pam.business.web.vm.VerifyOtpVM; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AuthenticationCredentialsNotFoundException; import org.springframework.stereotype.Service; import com.pollex.pam.config.ApplicationProperties; import com.pollex.pam.service.dto.OtpResponseDTO; import com.pollex.pam.business.service.dto.OtpResponseDTO; import org.springframework.transaction.annotation.Transactional; @Service @@ -27,9 +27,6 @@ @Autowired OtpTmpService otpTmpService; @Autowired LoginRecordService loginRecordService; @Transactional public void verifyOtp(VerifyOtpVM verifyOtpParam) { @@ -47,11 +44,9 @@ } else { log.info("otp login fail... , account = {}, error code = {}, failReason = {}", account, otpResponseDTO.getFailCode(), otpResponseDTO.getFailReason()); loginRecordService.saveOTPLoginFailRecord(account, otpResponseDTO.getFailReason()); throw new OtpLoginFailException(otpResponseDTO.getFailCode()); } } loginRecordService.saveOTPLoginSuccessRecord(account); setVerrifiedOtpTmp(account, indexKey); } pamapi/src/main/java/com/pollex/pam/service/OtpWebService.java
@@ -1,7 +1,7 @@ package com.pollex.pam.service; import com.pollex.pam.config.ApplicationProperties; import com.pollex.pam.service.dto.OtpResponseDTO; import com.pollex.pam.business.service.dto.OtpResponseDTO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; pamapi/src/main/java/com/pollex/pam/service/PersonalNotificationService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/SatisfactionService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/ScheduleTaskService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/SendMsgService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/UserService.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/UsernameAlreadyUsedException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/AbstractAppointmentProcessDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/AddConsultantParam.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/AdminUserDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentCloseDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentCreateDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentCustomerViewDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentMemoCreateDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentMemoUpdateDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentNoticeSendDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/AppointmentUpdateDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/ClosedProcessDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/ConsultantDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/ConsultantDetailDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/ConsultantEditDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/CustomerDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/CustomerFavoriteConsultantDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/CustomerRegisterDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/DoneProcessDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/EServiceRequest.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/EServiceResponse.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/FastQueryConsultantParam.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/InterviewRecordDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/OtpResponseDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/PasswordChangeDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/SMSDetail.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/SatisfactionCustomerScoreDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/SatisfactionDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/SatisfactionUpdateDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/SendMailRequest.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/SendMailResponse.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/SendSMSRequest.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/SendSMSResponse.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/StrictQueryConsultantParam.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/UserDTO.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/dto/package-info.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentCustomerViewMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentDTOMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentMemoMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/AppointmentNoticeSendMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/ConsultantDTOMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/ConsultantMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/CustomerDTOMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/CustomerMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/InterviewRecordMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/SatisfactionDTOMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/SatisfactionMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/UserMapper.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/mapper/package-info.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/package-info.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/util/FileUtil.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/util/HttpRequestUtil.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/util/StringUtils.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/service/util/VerifyCodeUtil.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/AccountResource.java
@@ -1,20 +1,16 @@ package com.pollex.pam.web.rest; import com.pollex.pam.domain.User; import com.pollex.pam.repository.UserRepository; import com.pollex.pam.security.SecurityUtils; import com.pollex.pam.security.jwt.JWTFilter; import com.pollex.pam.service.CustomerAuthService; import com.pollex.pam.business.domain.User; import com.pollex.pam.business.repository.UserRepository; import com.pollex.pam.business.security.SecurityUtils; import com.pollex.pam.service.CustomerService; import com.pollex.pam.service.MailService; import com.pollex.pam.service.UserService; import com.pollex.pam.service.dto.AdminUserDTO; import com.pollex.pam.service.dto.CustomerRegisterDTO; import com.pollex.pam.service.dto.PasswordChangeDTO; import com.pollex.pam.web.rest.UserJWTController.JWTToken; import com.pollex.pam.web.rest.errors.*; import com.pollex.pam.web.rest.vm.KeyAndPasswordVM; import com.pollex.pam.web.rest.vm.ManagedUserVM; import com.pollex.pam.business.service.MailService; import com.pollex.pam.business.service.UserService; import com.pollex.pam.business.service.dto.AdminUserDTO; import com.pollex.pam.business.service.dto.PasswordChangeDTO; import com.pollex.pam.business.web.errors.*; import com.pollex.pam.business.web.vm.KeyAndPasswordVM; import com.pollex.pam.business.web.vm.ManagedUserVM; import java.util.*; import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; @@ -22,9 +18,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; /** pamapi/src/main/java/com/pollex/pam/web/rest/AppointmentMemoResource.java
@@ -10,11 +10,10 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.pollex.pam.domain.AppointmentMemo; import com.pollex.pam.security.SecurityUtils; import com.pollex.pam.service.AppointmentMemoService; import com.pollex.pam.service.dto.AppointmentMemoCreateDTO; import com.pollex.pam.service.dto.AppointmentMemoUpdateDTO; import com.pollex.pam.business.domain.AppointmentMemo; import com.pollex.pam.business.service.AppointmentMemoService; import com.pollex.pam.business.service.dto.AppointmentMemoCreateDTO; import com.pollex.pam.business.service.dto.AppointmentMemoUpdateDTO; @RestController @RequestMapping("/api/appointment/memo") pamapi/src/main/java/com/pollex/pam/web/rest/AppointmentResource.java
@@ -1,20 +1,24 @@ package com.pollex.pam.web.rest; import com.pollex.pam.appointment.process.AppointmentProcess; import com.pollex.pam.domain.Appointment; import com.pollex.pam.security.SecurityUtils; import com.pollex.pam.service.SendMsgService; import com.pollex.pam.service.dto.*; import com.pollex.pam.business.aop.logging.audit.AuditLoggingInject; import com.pollex.pam.business.aop.logging.audit.AuditLoggingType; import com.pollex.pam.business.appointment.process.AppointmentProcess; import com.pollex.pam.business.domain.Appointment; import com.pollex.pam.business.security.SecurityUtils; import com.pollex.pam.business.service.SendMsgService; import com.pollex.pam.service.mapper.AppointmentMapper; import com.pollex.pam.business.service.dto.*; import com.pollex.pam.business.service.mapper.AppointmentMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import com.pollex.pam.service.AppointmentService; import com.pollex.pam.service.PersonalNotificationService; import com.pollex.pam.service.SatisfactionService; import com.pollex.pam.business.service.AppointmentService; import com.pollex.pam.business.service.PersonalNotificationService; import com.pollex.pam.business.service.SatisfactionService; import static com.pollex.pam.business.aop.logging.audit.AuditLoggingType.*; @RestController @RequestMapping("/api/appointment") @@ -38,6 +42,7 @@ @Autowired PersonalNotificationService personalNotificationService; @AuditLoggingInject(type = CUSTOMER_EDIT_APPOINTMENT) @PutMapping("") public ResponseEntity<Void> updateAppointment(@RequestBody AppointmentUpdateDTO dto) { Appointment appointment = appointmentService.updateAppointment(dto); @@ -45,12 +50,14 @@ return ResponseEntity.noContent().build(); } @AuditLoggingInject(type = AuditLoggingType.CUSTOMER_CANCEL_APPOINTMENT) @DeleteMapping("/{appointmentId}") public ResponseEntity<Void> markAppointmentDeleted(@PathVariable Long appointmentId) { appointmentService.markAppointmentDeleted(appointmentId); return ResponseEntity.noContent().build(); } @AuditLoggingInject(type = AuditLoggingType.CUSTOMER_CREATE_APPOINTMENT) @PostMapping("/customer/create") public AppointmentDTO clientCreateAppointment(@RequestBody AppointmentCreateDTO appointmentCreateDTO) { Appointment appointment = appointmentService.customerCreateAppointment(appointmentCreateDTO); @@ -66,17 +73,20 @@ return appointmentService.getAppointmentDetail(appointmentId); } @AuditLoggingInject(type = CHECK_APPOINTMENT) @GetMapping("/getDetail/{appointmentId}") public AppointmentCustomerViewDTO getAppointmentDetail(@PathVariable Long appointmentId) { return appointmentService.getAppointmentDetail(appointmentId); } @AuditLoggingInject(type = CONSULTANT_READ_APPOINTMENT) @PostMapping("/recordRead/{appointmentId}") public ResponseEntity<Void> recordConsultantReadAppointment(@PathVariable Long appointmentId) { appointmentService.recordConsultantReadTime(appointmentId); return ResponseEntity.noContent().build(); } @AuditLoggingInject(type = APPOINTMENT_CLOSE) @PostMapping("/close") public ResponseEntity<Void> closeAppointment(@RequestBody AppointmentCloseDTO closeDTO) { appointmentService.closeAppointment(closeDTO); pamapi/src/main/java/com/pollex/pam/web/rest/ConsultantLoginValidateResource.java
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.pollex.pam.service.util.VerifyCodeUtil; import com.pollex.pam.business.service.util.VerifyCodeUtil; @RestController @RequestMapping("/api/login/validate") pamapi/src/main/java/com/pollex/pam/web/rest/ConsultantResource.java
@@ -1,27 +1,25 @@ package com.pollex.pam.web.rest; import com.pollex.pam.domain.Appointment; import com.pollex.pam.domain.Consultant; import com.pollex.pam.security.SecurityUtils; import com.pollex.pam.service.AppointmentService; import com.pollex.pam.service.ConsultantService; import com.pollex.pam.service.dto.*; import com.pollex.pam.business.aop.logging.audit.AuditLoggingInject; import com.pollex.pam.business.domain.Appointment; import com.pollex.pam.business.domain.Consultant; import com.pollex.pam.business.security.SecurityUtils; import com.pollex.pam.business.service.AppointmentService; import com.pollex.pam.business.service.ConsultantService; import com.pollex.pam.business.service.dto.*; import org.apache.commons.compress.utils.IOUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.Resource; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.util.List; import static com.pollex.pam.business.aop.logging.audit.AuditLoggingType.CONSULTANT_SEND_FILL_SATISFACTION_NOTICE; import static com.pollex.pam.business.aop.logging.audit.AuditLoggingType.EDIT_CONSULTANT_DATA; @RestController @RequestMapping("/api/consultant") @@ -112,6 +110,7 @@ return ResponseEntity.noContent().build(); } @AuditLoggingInject(type = EDIT_CONSULTANT_DATA) @PostMapping("/edit") public ResponseEntity<Consultant> editConsultant(@RequestBody ConsultantEditDTO editDTO) { if(!editDTO.getAgentNo().equals(SecurityUtils.getAgentNo())) { @@ -121,6 +120,7 @@ return new ResponseEntity<>(editResult, HttpStatus.OK); } @AuditLoggingInject(type = CONSULTANT_SEND_FILL_SATISFACTION_NOTICE) @PostMapping("/sendSatisfactionToClient/{appointmentId}") public ResponseEntity<Void> sendSatisfactionToClient(@PathVariable Long appointmentId) { Appointment appointment = appointmentService.findById(appointmentId); pamapi/src/main/java/com/pollex/pam/web/rest/CustomerInfoResource.java
@@ -1,13 +1,16 @@ package com.pollex.pam.web.rest; import com.pollex.pam.business.aop.logging.audit.AuditLoggingInject; import com.pollex.pam.service.CustomerService; import com.pollex.pam.service.dto.CustomerDTO; import com.pollex.pam.business.service.dto.CustomerDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.util.Assert; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import static com.pollex.pam.business.aop.logging.audit.AuditLoggingType.EDIT_CUSTOMER_DATA; @RestController @RequestMapping("/api/customer/info") @@ -21,6 +24,7 @@ return new ResponseEntity<>(customerService.getLoggedCustomerDTO(), HttpStatus.OK); } @AuditLoggingInject(type = EDIT_CUSTOMER_DATA) @PutMapping("") public ResponseEntity<Void> updateLoggedCustomerInfo(@RequestBody CustomerDTO customerDTO) { boolean hasEmail = StringUtils.hasText(customerDTO.getEmail()); pamapi/src/main/java/com/pollex/pam/web/rest/EServiceResource.java
@@ -1,9 +1,11 @@ package com.pollex.pam.web.rest; import com.pollex.pam.business.aop.logging.audit.AuditLoggingInject; import com.pollex.pam.business.service.ConsultantService; import com.pollex.pam.security.jwt.JWTFilter; import com.pollex.pam.security.jwt.TokenProvider; import com.pollex.pam.security.token.EServiceAuthenticationToken; import com.pollex.pam.web.rest.vm.EServiceLoginVM; import com.pollex.pam.business.security.token.EServiceAuthenticationToken; import com.pollex.pam.business.web.vm.EServiceLoginVM; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; @@ -16,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import static com.pollex.pam.business.aop.logging.audit.AuditLoggingType.CONSULTANT_LOGIN; @RestController @RequestMapping("/api/eService") public class EServiceResource { @@ -26,6 +30,10 @@ @Autowired TokenProvider tokenProvider; @Autowired ConsultantService consultantService; @AuditLoggingInject(type = CONSULTANT_LOGIN) @PostMapping("/authenticate") public ResponseEntity<UserJWTController.JWTToken> authorize(@RequestBody EServiceLoginVM eServiceLoginVM) { EServiceAuthenticationToken authenticationToken = new EServiceAuthenticationToken( @@ -34,7 +42,9 @@ ); Authentication authentication = authenticationManagerBuilder.getObject().authenticate(authenticationToken); consultantService.updateLoginTime(eServiceLoginVM.getUsername()); SecurityContextHolder.getContext().setAuthentication(authenticationToken); String jwt = tokenProvider.createToken(authentication, false); HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.add(JWTFilter.AUTHORIZATION_HEADER, "Bearer" + jwt); pamapi/src/main/java/com/pollex/pam/web/rest/InterviewRecordResource.java
@@ -1,5 +1,6 @@ package com.pollex.pam.web.rest; import com.pollex.pam.business.aop.logging.audit.AuditLoggingInject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -8,9 +9,11 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.pollex.pam.domain.InterviewRecord; import com.pollex.pam.service.InterviewRecordService; import com.pollex.pam.service.dto.InterviewRecordDTO; import com.pollex.pam.business.domain.InterviewRecord; import com.pollex.pam.business.service.InterviewRecordService; import com.pollex.pam.business.service.dto.InterviewRecordDTO; import static com.pollex.pam.business.aop.logging.audit.AuditLoggingType.CONSULTANT_CREATE_INTERVIEW; @RestController @RequestMapping("/api/interview_record") @@ -19,6 +22,7 @@ @Autowired InterviewRecordService interviewRecordService; @AuditLoggingInject(type = CONSULTANT_CREATE_INTERVIEW) @PostMapping("/create") public InterviewRecord create(@RequestBody InterviewRecordDTO dto) { return interviewRecordService.create(dto); pamapi/src/main/java/com/pollex/pam/web/rest/NoticeResource.java
@@ -1,18 +1,19 @@ package com.pollex.pam.web.rest; import com.pollex.pam.business.aop.logging.audit.AuditLoggingInject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.pollex.pam.domain.Appointment; import com.pollex.pam.domain.AppointmentNoticeLog; import com.pollex.pam.security.SecurityUtils; import com.pollex.pam.service.AppointmentService; import com.pollex.pam.service.NoticeService; import com.pollex.pam.service.dto.AppointmentNoticeSendDTO; import com.pollex.pam.business.domain.Appointment; import com.pollex.pam.business.security.SecurityUtils; import com.pollex.pam.business.service.AppointmentService; import com.pollex.pam.business.service.NoticeService; import com.pollex.pam.business.service.dto.AppointmentNoticeSendDTO; import static com.pollex.pam.business.aop.logging.audit.AuditLoggingType.CONSULTANT_SEND_INTERVIEW_NOTICE; @RestController @RequestMapping("/api/notice") @@ -24,6 +25,7 @@ @Autowired AppointmentService appointmentService; @AuditLoggingInject(type = CONSULTANT_SEND_INTERVIEW_NOTICE) @PostMapping("/send") public void sendNotice(@RequestBody AppointmentNoticeSendDTO dto) { Appointment appointment = appointmentService.findById(dto.getAppointmentId()); pamapi/src/main/java/com/pollex/pam/web/rest/OtpResource.java
@@ -3,7 +3,7 @@ import java.util.Arrays; import java.util.UUID; import com.pollex.pam.web.rest.errors.CustomerNotRegisteredException; import com.pollex.pam.business.aop.logging.audit.AuditLoggingInject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -17,20 +17,22 @@ import org.springframework.web.bind.annotation.RestController; import com.pollex.pam.config.ApplicationProperties; import com.pollex.pam.domain.Customer; import com.pollex.pam.enums.OtpLoginTypeEnum; import com.pollex.pam.repository.CustomerRepository; import com.pollex.pam.business.domain.Customer; import com.pollex.pam.business.enums.OtpLoginTypeEnum; import com.pollex.pam.business.repository.CustomerRepository; import com.pollex.pam.security.jwt.JWTFilter; import com.pollex.pam.security.jwt.TokenProvider; import com.pollex.pam.service.CustomerAuthService; import com.pollex.pam.service.CustomerService; import com.pollex.pam.service.OtpTmpService; import com.pollex.pam.business.service.OtpTmpService; import com.pollex.pam.service.OtpUtilService; import com.pollex.pam.service.OtpWebService; import com.pollex.pam.service.dto.CustomerRegisterDTO; import com.pollex.pam.service.dto.OtpResponseDTO; import com.pollex.pam.web.rest.vm.OtpLoginVM; import com.pollex.pam.web.rest.vm.VerifyOtpVM; import com.pollex.pam.business.service.dto.CustomerRegisterDTO; import com.pollex.pam.business.service.dto.OtpResponseDTO; import com.pollex.pam.business.web.vm.OtpLoginVM; import com.pollex.pam.business.web.vm.VerifyOtpVM; import static com.pollex.pam.business.aop.logging.audit.AuditLoggingType.CUSTOMER_LOGIN; @RestController @RequestMapping("/api/otp") @@ -82,6 +84,7 @@ return new ResponseEntity<>(otpResponse, HttpStatus.OK); } @AuditLoggingInject(type = CUSTOMER_LOGIN) @PostMapping("/verify") public ResponseEntity<UserJWTController.JWTToken> verifyOtp(@RequestBody VerifyOtpVM verifyOtpParam) { otpUtilService.verifyOtp(verifyOtpParam); pamapi/src/main/java/com/pollex/pam/web/rest/PersonalNotificationResource.java
@@ -8,20 +8,17 @@ import org.springframework.http.ResponseEntity; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.pollex.pam.domain.Consultant; import com.pollex.pam.domain.PersonalNotification; import com.pollex.pam.enums.NotificationTypeEnum; import com.pollex.pam.enums.PersonalNotificationRoleEnum; import com.pollex.pam.repository.PersonalNotificationRepository; import com.pollex.pam.security.SecurityUtils; import com.pollex.pam.service.ConsultantService; import com.pollex.pam.service.PersonalNotificationService; import com.pollex.pam.business.domain.Consultant; import com.pollex.pam.business.domain.PersonalNotification; import com.pollex.pam.business.enums.PersonalNotificationRoleEnum; import com.pollex.pam.business.repository.PersonalNotificationRepository; import com.pollex.pam.business.security.SecurityUtils; import com.pollex.pam.business.service.ConsultantService; import com.pollex.pam.business.service.PersonalNotificationService; @RestController @RequestMapping("/api/personal_notification") pamapi/src/main/java/com/pollex/pam/web/rest/PublicUserResource.java
@@ -1,7 +1,7 @@ package com.pollex.pam.web.rest; import com.pollex.pam.service.UserService; import com.pollex.pam.service.dto.UserDTO; import com.pollex.pam.business.service.UserService; import com.pollex.pam.business.service.dto.UserDTO; import java.util.*; import java.util.Collections; import org.slf4j.Logger; pamapi/src/main/java/com/pollex/pam/web/rest/SatisfactionResource.java
@@ -2,7 +2,9 @@ import java.util.List; import com.pollex.pam.enums.SatisfactionTypeEnum; import com.pollex.pam.business.aop.logging.audit.AuditLoggingInject; import com.pollex.pam.business.aop.logging.audit.AuditLoggingType; import com.pollex.pam.business.enums.SatisfactionTypeEnum; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -13,11 +15,11 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.pollex.pam.domain.Satisfaction; import com.pollex.pam.security.SecurityUtils; import com.pollex.pam.service.SatisfactionService; import com.pollex.pam.service.dto.SatisfactionCustomerScoreDTO; import com.pollex.pam.service.dto.SatisfactionDTO; import com.pollex.pam.business.domain.Satisfaction; import com.pollex.pam.business.security.SecurityUtils; import com.pollex.pam.business.service.SatisfactionService; import com.pollex.pam.business.service.dto.SatisfactionCustomerScoreDTO; import com.pollex.pam.business.service.dto.SatisfactionDTO; @RestController @RequestMapping("/api/satisfaction") @@ -29,11 +31,13 @@ @Autowired SatisfactionService satisfactionService; @AuditLoggingInject(type = AuditLoggingType.CUSTOMER_FILL_SATISFACTION) @PostMapping("/score") public Satisfaction scorefaction(@RequestBody SatisfactionCustomerScoreDTO scoreDTO) { return satisfactionService.scorefaction(scoreDTO); } @AuditLoggingInject(type = AuditLoggingType.CUSTOMER_FILL_SATISFACTION) @PostMapping("/score/all") public List<Satisfaction> scoreAllfaction(@RequestBody List<SatisfactionCustomerScoreDTO> scoreDTO) { return satisfactionService.scoreAllfaction(scoreDTO); pamapi/src/main/java/com/pollex/pam/web/rest/TestLoginResource.java
@@ -2,10 +2,9 @@ import com.pollex.pam.config.ApplicationProperties; import com.pollex.pam.security.jwt.TokenProvider; import com.pollex.pam.service.LoginRecordService; import com.pollex.pam.service.OtpWebService; import com.pollex.pam.service.dto.EServiceResponse; import com.pollex.pam.service.dto.OtpResponseDTO; import com.pollex.pam.business.service.dto.EServiceResponse; import com.pollex.pam.business.service.dto.OtpResponseDTO; import org.apache.http.conn.ssl.NoopHostnameVerifier; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.impl.client.CloseableHttpClient; @@ -41,9 +40,6 @@ public class TestLoginResource { private final static Logger log = LoggerFactory.getLogger(TestLoginResource.class); @Autowired LoginRecordService loginRecordService; @Autowired ApplicationProperties applicationProperty; pamapi/src/main/java/com/pollex/pam/web/rest/TestSendMsgResource.java
@@ -1,12 +1,11 @@ package com.pollex.pam.web.rest; import com.pollex.pam.service.AppointmentService; import com.pollex.pam.service.SendMsgService; import com.pollex.pam.service.dto.SendSMSResponse; import com.pollex.pam.business.service.AppointmentService; import com.pollex.pam.business.service.SendMsgService; import com.pollex.pam.business.service.dto.SendSMSResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import org.thymeleaf.context.Context; import org.thymeleaf.spring5.SpringTemplateEngine; @Deprecated pamapi/src/main/java/com/pollex/pam/web/rest/UserJWTController.java
@@ -3,7 +3,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.pollex.pam.security.jwt.JWTFilter; import com.pollex.pam.security.jwt.TokenProvider; import com.pollex.pam.web.rest.vm.LoginVM; import com.pollex.pam.business.web.vm.LoginVM; import javax.validation.Valid; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; pamapi/src/main/java/com/pollex/pam/web/rest/UserResource.java
@@ -1,15 +1,15 @@ package com.pollex.pam.web.rest; import com.pollex.pam.config.Constants; import com.pollex.pam.domain.User; import com.pollex.pam.repository.UserRepository; import com.pollex.pam.security.AuthoritiesConstants; import com.pollex.pam.service.MailService; import com.pollex.pam.service.UserService; import com.pollex.pam.service.dto.AdminUserDTO; import com.pollex.pam.web.rest.errors.BadRequestAlertException; import com.pollex.pam.web.rest.errors.EmailAlreadyUsedException; import com.pollex.pam.web.rest.errors.LoginAlreadyUsedException; import com.pollex.pam.business.config.Constants; import com.pollex.pam.business.domain.User; import com.pollex.pam.business.repository.UserRepository; import com.pollex.pam.business.security.AuthoritiesConstants; import com.pollex.pam.business.service.MailService; import com.pollex.pam.business.service.UserService; import com.pollex.pam.business.service.dto.AdminUserDTO; import com.pollex.pam.business.web.errors.BadRequestAlertException; import com.pollex.pam.business.web.errors.EmailAlreadyUsedException; import com.pollex.pam.business.web.errors.LoginAlreadyUsedException; import java.net.URI; import java.net.URISyntaxException; import java.util.*; pamapi/src/main/java/com/pollex/pam/web/rest/errors/AppointmentClosedInfoNotFoundException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/AppointmentMemoNotFoundException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/AppointmentNotFoundException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/BadRequestAlertException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/ConsultantNotFoundException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/CustomerNotRegisteredException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/EServiceErrorException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/EmailAlreadyUsedException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/ErrorConstants.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/ExceptionTranslator.java
@@ -9,6 +9,9 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import javax.servlet.http.HttpServletRequest; import com.pollex.pam.business.service.UsernameAlreadyUsedException; import com.pollex.pam.business.web.errors.*; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.core.env.Environment; @@ -117,7 +120,7 @@ @ExceptionHandler public ResponseEntity<Problem> handleEmailAlreadyUsedException( com.pollex.pam.service.EmailAlreadyUsedException ex, com.pollex.pam.business.service.EmailAlreadyUsedException ex, NativeWebRequest request ) { EmailAlreadyUsedException problem = new EmailAlreadyUsedException(); @@ -130,7 +133,7 @@ @ExceptionHandler public ResponseEntity<Problem> handleUsernameAlreadyUsedException( com.pollex.pam.service.UsernameAlreadyUsedException ex, UsernameAlreadyUsedException ex, NativeWebRequest request ) { LoginAlreadyUsedException problem = new LoginAlreadyUsedException(); @@ -143,7 +146,7 @@ @ExceptionHandler public ResponseEntity<Problem> handleInvalidPasswordException( com.pollex.pam.service.InvalidPasswordException ex, com.pollex.pam.business.service.InvalidPasswordException ex, NativeWebRequest request ) { return create(new InvalidPasswordException(), request); pamapi/src/main/java/com/pollex/pam/web/rest/errors/FieldErrorVM.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/InterviewRecordNotFoundException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/InvalidPasswordException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/LoginAlreadyUsedException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/NotFoundExpiringAppointmentException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/NotLoginException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/OtpLoginFailException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/SatisfactionAlreadyExistException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/SatisfactionNotFoundException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/SendEmailFailException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/SendSMSFailException.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/errors/package-info.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/vm/EServiceLoginVM.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/vm/KeyAndPasswordVM.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/vm/LoginVM.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/vm/ManagedUserVM.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/vm/OtpAccount.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/vm/OtpEmailLoginVM.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/vm/OtpLoginVM.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/vm/OtpSMSLoginVM.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/vm/VerifyOtpVM.java
Àɮפw§R°£ pamapi/src/main/java/com/pollex/pam/web/rest/vm/package-info.java
Àɮפw§R°£ pamapi/src/main/resources/config/application-dev.yml
@@ -125,7 +125,7 @@ e-service-login-url: https://eserviceuat.pcalife.com.tw/sso/chatbotValidate e-service-login-func: ValidateUsrLogin e-service-login-sys: epos front-end-domain: http://localhost:3000 front-end-domain: 'http://localhost:3000/#' sms: send-notify-msg: false url: https://localhost:8081/testSMS pamapi/src/main/resources/config/application-pollex.yml
@@ -123,7 +123,7 @@ e-service-login-url: https://eserviceuat.pcalife.com.tw/sso/chatbotValidate e-service-login-func: ValidateUsrLogin e-service-login-sys: epos front-end-domain: http://dev.pollex.com.tw:5566/pam front-end-domain: 'http://dev.pollex.com.tw:5566/pam/#' sms: send-notify-msg: false url: https://localhost:8081/testSMS pamapi/src/main/resources/config/application-prod.yml
@@ -131,6 +131,7 @@ # https://www.jhipster.tech/common-application-properties/ # =================================================================== # PRODç°å¢å¾ ç¢ºèª application: mock-login: false otp-web-service-url: https://vtwlifeopensysuat.pru.intranet.asia/pcalife-otp/ws/otpWebService?wsdl @@ -139,7 +140,7 @@ e-service-login-url: https://eserviceuat.pcalife.com.tw/sso/chatbotValidate e-service-login-func: ValidateUsrLogin e-service-login-sys: epos front-end-domain: https://vtwlifeopensysuat.pru.intranet.asia/pam front-end-domain: 'https://onlineuat.pcalife.com.tw/pam/#' sms: send-notify-msg: true url: https://vtwlifeopensysuat.pru.intranet.asia/MesgQueueMgmnt/rest/smsSendMsgResource pamapi/src/main/resources/config/application-sit.yml
@@ -117,7 +117,7 @@ e-service-login-url: https://eserviceuat.pcalife.com.tw/sso/chatbotValidate e-service-login-func: ValidateUsrLogin e-service-login-sys: epos front-end-domain: https://vtwlifeopensyssit.pru.intranet.asia/pam front-end-domain: 'https://vtwlifeopensyssit.pru.intranet.asia/pam/#' sms: send-notify-msg: true url: https://vtwlifeopensysuat.pru.intranet.asia/MesgQueueMgmnt/rest/smsSendMsgResource pamapi/src/main/resources/config/application-uat.yml
@@ -117,7 +117,7 @@ e-service-login-url: https://eserviceuat.pcalife.com.tw/sso/chatbotValidate e-service-login-func: ValidateUsrLogin e-service-login-sys: epos front-end-domain: https://vtwlifeopensysuat.pru.intranet.asia/pam front-end-domain: 'https://onlineuat.pcalife.com.tw/pam/#' sms: send-notify-msg: true url: https://vtwlifeopensysuat.pru.intranet.asia/MesgQueueMgmnt/rest/smsSendMsgResource pamapi/src/main/resources/i18n/messages.properties
@@ -24,7 +24,7 @@ email.write.satisfaction.content={0}\u9867\u554F\u8ACB\u60A8\u586B\u5BEB\u4FDD\u8AA0\u5A92\u5408\u5E73\u53F0\u7684\u6EFF\u610F\u5EA6\u8A55\u6BD4{1} # appointment pending notify email email.write.appointment.pending.content=\u60a8\u6709{0}\u5247\u9810\u7d04\u55ae\u672a\u9032\u884c\u806f\u7e6b\uff0c\u8acb\u76e1\u901f\u8655\u7406 email.write.appointment.pending.content=\u60a8\u6709{0}\u5247\u9810\u7d04\u55ae\u672a\u9032\u884c\u806f\u7e6b\uff0c\u8acb\u76e1\u901f\u8655\u7406\uff0c\u9ede\u64ca\u7db2\u5740\uff1a{1} # appointment expiring notify email email.write.appointment.expiring.content=\u5f88\u62b1\u6b49\uff01\u60a8\u9810\u7d04{0}\u9867\u554f\u6b63\u5fd9\u788c\u4e2d\uff0c\u8acb\u60a8\u53d6\u6d88\u9810\u7d04\u4e26\u6539\u9078\u5176\u4ed6\u9867\u554f\uff0c\u8acb\u9ede\u64ca\u7db2\u5740\uff1a{1} pamapi/src/main/resources/i18n/messages_zh_TW.properties
@@ -24,7 +24,7 @@ email.write.satisfaction.content={0}\u9867\u554F\u8ACB\u60A8\u586B\u5BEB\u4FDD\u8AA0\u5A92\u5408\u5E73\u53F0\u7684\u6EFF\u610F\u5EA6\u8A55\u6BD4{1} # appointment pending notify email email.write.appointment.pending.content=\u60a8\u6709{0}\u5247\u9810\u7d04\u55ae\u672a\u9032\u884c\u806f\u7e6b\uff0c\u8acb\u76e1\u901f\u8655\u7406 email.write.appointment.pending.content=\u60a8\u6709{0}\u5247\u9810\u7d04\u55ae\u672a\u9032\u884c\u806f\u7e6b\uff0c\u8acb\u76e1\u901f\u8655\u7406\uff0c\u9ede\u64ca\u7db2\u5740\uff1a{1} # appointment expiring notify email email.write.appointment.expiring.content=\u5f88\u62b1\u6b49\uff01\u60a8\u9810\u7d04{0}\u9867\u554f\u6b63\u5fd9\u788c\u4e2d\uff0c\u8acb\u60a8\u53d6\u6d88\u9810\u7d04\u4e26\u6539\u9078\u5176\u4ed6\u9867\u554f\uff0c\u8acb\u9ede\u64ca\u7db2\u5740\uff1a{1} pamapi/src/main/resources/templates/mail/appointmentPendingNotifyEmail.html
@@ -5,7 +5,7 @@ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> </head> <body> <p th:text="#{email.write.appointment.pending.content(${pendingAppointmentSum})}">æ¨æxåé ç´å®æªé²è¡è¯ç¹«ï¼è«ç¡éèç</p> <p th:text="#{email.write.appointment.pending.content(${pendingAppointmentSum}, ${notifyUrl})}">æ¨æxåé ç´å®æªé²è¡è¯ç¹«ï¼è«ç¡éèçï¼é»æç¶²åï¼</p> </body> </html> pamapi/src/test/java/com/pollex/pam/ArchTest.java
@@ -17,9 +17,9 @@ noClasses() .that() .resideInAnyPackage("com.pollex.pam.service..") .resideInAnyPackage("com.pollex.pam.business.service..") .or() .resideInAnyPackage("com.pollex.pam.repository..") .resideInAnyPackage("com.pollex.pam.business.repository..") .should() .dependOnClassesThat() .resideInAnyPackage("..com.pollex.pam.web..") pamapi/src/test/java/com/pollex/pam/config/NoOpMailConfiguration.java
@@ -4,7 +4,7 @@ import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.mock; import com.pollex.pam.service.MailService; import com.pollex.pam.business.service.MailService; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; pamapi/src/test/java/com/pollex/pam/config/timezone/HibernateTimeZoneIT.java
Àɮפw§R°£ pamapi/src/test/java/com/pollex/pam/repository/timezone/DateTimeWrapper.java
Àɮפw§R°£ pamapi/src/test/java/com/pollex/pam/repository/timezone/DateTimeWrapperRepository.java
Àɮפw§R°£ pamapi/src/test/java/com/pollex/pam/security/DomainUserDetailsServiceIT.java
Àɮפw§R°£ pamapi/src/test/java/com/pollex/pam/security/SecurityUtilsUnitTest.java
Àɮפw§R°£ pamapi/src/test/java/com/pollex/pam/security/jwt/JWTFilterTest.java
Àɮפw§R°£ pamapi/src/test/java/com/pollex/pam/security/jwt/TokenProviderTest.java
Àɮפw§R°£ pamapi/src/test/java/com/pollex/pam/service/MailServiceIT.java
Àɮפw§R°£ pamapi/src/test/java/com/pollex/pam/service/UserServiceIT.java
Àɮפw§R°£ pamapi/src/test/java/com/pollex/pam/service/mapper/UserMapperTest.java
Àɮפw§R°£ pamapi/src/test/java/com/pollex/pam/web/rest/AccountResourceIT.java
@@ -6,17 +6,16 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; import com.pollex.pam.IntegrationTest; import com.pollex.pam.config.Constants; import com.pollex.pam.domain.User; import com.pollex.pam.repository.AuthorityRepository; import com.pollex.pam.repository.UserRepository; import com.pollex.pam.security.AuthoritiesConstants; import com.pollex.pam.service.UserService; import com.pollex.pam.service.dto.AdminUserDTO; import com.pollex.pam.service.dto.PasswordChangeDTO; import com.pollex.pam.service.dto.UserDTO; import com.pollex.pam.web.rest.vm.KeyAndPasswordVM; import com.pollex.pam.web.rest.vm.ManagedUserVM; import com.pollex.pam.business.config.Constants; import com.pollex.pam.business.domain.User; import com.pollex.pam.business.repository.AuthorityRepository; import com.pollex.pam.business.repository.UserRepository; import com.pollex.pam.business.security.AuthoritiesConstants; import com.pollex.pam.business.service.UserService; import com.pollex.pam.business.service.dto.AdminUserDTO; import com.pollex.pam.business.service.dto.PasswordChangeDTO; import com.pollex.pam.business.web.vm.KeyAndPasswordVM; import com.pollex.pam.business.web.vm.ManagedUserVM; import java.time.Instant; import java.util.*; import org.apache.commons.lang3.RandomStringUtils; pamapi/src/test/java/com/pollex/pam/web/rest/PublicUserResourceIT.java
@@ -6,9 +6,9 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; import com.pollex.pam.IntegrationTest; import com.pollex.pam.domain.User; import com.pollex.pam.repository.UserRepository; import com.pollex.pam.security.AuthoritiesConstants; import com.pollex.pam.business.domain.User; import com.pollex.pam.business.repository.UserRepository; import com.pollex.pam.business.security.AuthoritiesConstants; import javax.persistence.EntityManager; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; pamapi/src/test/java/com/pollex/pam/web/rest/UserJWTControllerIT.java
@@ -10,9 +10,9 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.pollex.pam.IntegrationTest; import com.pollex.pam.domain.User; import com.pollex.pam.repository.UserRepository; import com.pollex.pam.web.rest.vm.LoginVM; import com.pollex.pam.business.domain.User; import com.pollex.pam.business.repository.UserRepository; import com.pollex.pam.business.web.vm.LoginVM; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; pamapi/src/test/java/com/pollex/pam/web/rest/UserResourceIT.java
@@ -7,13 +7,13 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; import com.pollex.pam.IntegrationTest; import com.pollex.pam.domain.Authority; import com.pollex.pam.domain.User; import com.pollex.pam.repository.UserRepository; import com.pollex.pam.security.AuthoritiesConstants; import com.pollex.pam.service.dto.AdminUserDTO; import com.pollex.pam.service.mapper.UserMapper; import com.pollex.pam.web.rest.vm.ManagedUserVM; import com.pollex.pam.business.domain.Authority; import com.pollex.pam.business.domain.User; import com.pollex.pam.business.repository.UserRepository; import com.pollex.pam.business.security.AuthoritiesConstants; import com.pollex.pam.business.service.dto.AdminUserDTO; import com.pollex.pam.business.service.mapper.UserMapper; import com.pollex.pam.business.web.vm.ManagedUserVM; import java.time.Instant; import java.util.*; import java.util.function.Consumer; pamapi/src/test/java/com/pollex/pam/web/rest/errors/ExceptionTranslatorIT.java
Àɮפw§R°£ pamapi/src/test/java/com/pollex/pam/web/rest/errors/ExceptionTranslatorTestController.java
Àɮפw§R°£