Merge branch 'master' of https://192.168.0.10:8443/r/pcalife/PAM
| | |
| | | &:disabled { |
| | | background-color: $LIGHT_GREY; |
| | | } |
| | | } |
| | | |
| | | .pam-cus-tabs { |
| | | display: flex; |
| | | width: 100%; |
| | | height: 45px; |
| | | |
| | | .cus-tab-item { |
| | | width: 50%; |
| | | text-align: center; |
| | | font-size: 24px; |
| | | border-bottom: solid 3px $LIGHT_GREY; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .is-active { |
| | | font-weight: bold; |
| | | border-bottom: solid 3px $PRIMARY_BLACK; |
| | | |
| | | } |
| | | } |
| | |
| | | .pr-10 { |
| | | padding-right: 10px; |
| | | } |
| | | |
| | | .pr-5{ |
| | | padding-right: 5px; |
| | | } |
| | | .pl-10 { |
| | | padding-left: 10px; |
| | | } |
| | |
| | | .pam-page { |
| | | padding: 20px 30px 40px 30px; |
| | | } |
| | | |
| | | @for $fontSize from 12 through 45 { |
| | | .fs-#{$fontSize} { |
| | | font-size: #{$fontSize} + 'px'; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | @include desktop { |
| | | @media (min-width: 768px) { |
| | | .el-carousel__container { |
| | | transform: translateX(25%); |
| | | transform: translateX(27%); |
| | | } |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | export function isMobileDevice() { |
| | | let mobileDevices = ['Android', 'webOS', 'iPhone', 'iPad', 'iPod', 'BlackBerry', 'Windows Phone']; |
| | | console.log(navigator.userAgent); |
| | | return mobileDevices.some(e => navigator.userAgent.match(e)); |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | <template> |
| | | <div> |
| | | <el-row type="flex" class="rowStyle"> |
| | | <el-col :xs="5" :sm="3"> |
| | | <el-avatar |
| | | :size="50" |
| | | src="" |
| | | class="cursor--pointer" |
| | | ></el-avatar> |
| | | <div class="satisfaction"> |
| | | <i class="icon-star pam-icon icon--yellow satisfaction"></i> |
| | | <span>{{'1'}}</span> |
| | | </div> |
| | | </el-col> |
| | | <el-col :xs="14" :sm="15"> |
| | | <div class="smTxt_bold name">{{client.name}}</div> |
| | | <div class="message">é ç´æå</div> |
| | | <div class="professionals"> |
| | | <template v-if="client.requirements.length > 0"> |
| | | <span |
| | | v-for="(item, index) in client.requirements" |
| | | :key="index" |
| | | class="professionalsTxt" |
| | | >#{{item}}</span> |
| | | </template> |
| | | <template v-else> |
| | | <span class="professionalsTxt noProfessionalsTxt" |
| | | >(å®¢æ¶æªæä¾éæ±é
ç®)</span> |
| | | </template> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="flex-column contactInfo" :xs="5" :sm="6"> |
| | | <div class="smTxt_bold cursor--pointer" |
| | | :class="client.communicateStatus" |
| | | @click="openDetail" |
| | | >{{isReserved ? 'å·²é ç´' : 'å·²è¯çµ¡'}} |
| | | </div> |
| | | <div class="date xsTxt text--mid_grey">{{date}}</div> |
| | | <div class="xsTxt text--mid_grey">{{time}}</div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <Ui-Dialog |
| | | :isVisible.sync="isVisibleDialog" |
| | | :width="width" |
| | | > |
| | | <h5 class="subTitle text--center mb-30" |
| | | >{{isReserved ? 'é ç´æå' : 'å·²è¯çµ¡è³è¨'}}</h5> |
| | | <p class="smTxt text-right">ä»å¤© 10:00</p> |
| | | <div class="dialogTxt"> |
| | | <p>å§åï¼{{client.name}}</p> |
| | | <p>é»è©±ï¼0912345678</p> |
| | | <p>Emailï¼</p> |
| | | <p>æ§å¥ï¼{{client.gender === 'male' ? 'ç·æ§' : '女æ§'}}</p> |
| | | <p>年齡ï¼{{client.age}}</p> |
| | | <p>è·æ¥ï¼ä¸è¬è·æ¥</p> |
| | | <p>éæ±ï¼{{client.requirements}}</p> |
| | | <p>é£çµ¡ææ®µä¸ï¼ææä¸,æææ¥ 18:00~21:00</p> |
| | | <div class="mt-30 text--center"> |
| | | <el-button>{{isReserved ? 'æ¨è¨»çºå·²é£çµ¡' : 'ç¼é滿æåº¦'}}</el-button> |
| | | </div> |
| | | </div> |
| | | </Ui-Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop } from 'nuxt-property-decorator'; |
| | | import { isMobileDevice } from '~/assets/ts/device'; |
| | | import { Clients } from '~/pages/clientReservedList.vue'; |
| | | |
| | | @Component |
| | | export default class ClientList extends Vue { |
| | | @Prop() client!: Clients; |
| | | isVisibleDialog = false; |
| | | width = ''; |
| | | |
| | | get time() { |
| | | const hours = this.client.time.getHours(); |
| | | const minutes = this.client.time.getMinutes(); |
| | | return `${hours} : ${minutes}` |
| | | } |
| | | |
| | | get date() { |
| | | const month = this.client.time.getMonth(); |
| | | const date = this.client.time.getDate(); |
| | | return `${month} / ${date}` |
| | | } |
| | | |
| | | get isReserved() { |
| | | return this.client.communicateStatus === 'reserved'; |
| | | } |
| | | |
| | | openDetail() { |
| | | this.width = isMobileDevice() ? '80%' : ''; |
| | | this.isVisibleDialog = true; |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .rowStyle { |
| | | padding: 10px; |
| | | background-color: $PRIMARY_WHITE; |
| | | margin-bottom: 10px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .satisfaction { |
| | | font-size: 12px; |
| | | font-weight: bold; |
| | | margin-top: 5px; |
| | | } |
| | | |
| | | .message { |
| | | margin:10px 0; |
| | | } |
| | | |
| | | .professionals { |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | |
| | | .professionalsTxt { |
| | | font-size: 12px; |
| | | font-weight: bold; |
| | | margin-right: 5px; |
| | | } |
| | | |
| | | .noProfessionalsTxt { |
| | | color: $PRUDENTIAL_GREY; |
| | | font-weight: lighter; |
| | | } |
| | | } |
| | | |
| | | .contactInfo { |
| | | text-align: right; |
| | | .date { |
| | | font-size: 12px; |
| | | } |
| | | } |
| | | |
| | | .reserved { |
| | | @extend .text--primary; |
| | | } |
| | | |
| | | .contacted { |
| | | color: $SKY_BLUE; |
| | | } |
| | | } |
| | | |
| | | .flex-column { |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .dialogTxt { |
| | | font-size: 20px; |
| | | } |
| | | |
| | | .text-right { |
| | | text-align: right; |
| | | } |
| | | </style> |
¤ñ¹ï·sÀÉ®× |
| | |
| | | <template> |
| | | <div> |
| | | <template v-if="clients.length > 0"> |
| | | <ClientCard |
| | | v-for="(client, index) in clients" |
| | | :key="index" |
| | | :client="client" |
| | | ></ClientCard> |
| | | </template> |
| | | <template v-else> |
| | | <div class="emptyRowStyle"> |
| | | <div class="smTxt txt">{{title === 'reservedList' ? 'æ¨ç®åç¡å·²é ç´å®¢æ¶' : 'æ¨ç®åç¡å·²è¯çµ¡å®¢æ¶'}}</div> |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang='ts'> |
| | | import { Vue, Component, Prop } from 'nuxt-property-decorator'; |
| | | import { Clients } from '~/pages/clientReservedList.vue'; |
| | | |
| | | @Component |
| | | export default class ClientList extends Vue { |
| | | @Prop() clients!: Clients[]; |
| | | @Prop() title!: string; |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .emptyRowStyle { |
| | | background-color: $PRIMARY_WHITE; |
| | | width: 100%; |
| | | height: 100px; |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | |
| | | .txt { |
| | | color: $PRUDENTIAL_GREY; |
| | | margin-left: 17px; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <Ui-Dialog :isVisible.sync="isVisibleDialog"> |
| | | <Ui-Dialog |
| | | :isVisible.sync="isVisibleDialog" |
| | | :width="width" |
| | | > |
| | | <h5 class="subTitle text--center mb-30">é ç´æå</h5> |
| | | <p class="smTxt">ä»å¤© 10:00</p> |
| | | <div class="dialogInfo"> |
| | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop, Emit } from 'nuxt-property-decorator'; |
| | | import { Agents } from '~/plugins/api/home'; |
| | | import { isMobileDevice } from '~/assets/ts/device'; |
| | | |
| | | @Component |
| | | export default class ConsultantCard extends Vue { |
| | | @Prop() agentInfo!: Agents; |
| | | isVisibleDialog = false; |
| | | width: string = ''; |
| | | |
| | | get contactTxt() { |
| | | if (this.agentInfo.contactStatus === 'contacted') { |
| | |
| | | if (this.agentInfo.contactStatus === 'picked') { |
| | | this.$router.push('/communication/myDemand') |
| | | } else { |
| | | this.width = isMobileDevice() ? '80%' : ''; |
| | | this.isVisibleDialog = true; |
| | | } |
| | | } |
| | |
| | | <li class="pam-header__dropdown-item" @click="$router.push('/record/contactRecord')">æ¥çç´é</li> |
| | | <li class="pam-header__dropdown-item" @click="$router.push('/contactList/consultantList')">æç顧忏
å®</li> |
| | | <li class="pam-header__dropdown-item">ç»åº</li> |
| | | <li class="pam-header__dropdown-item pam-header__dropdown-divider" @click="$router.push('/login')">é¡§åç»å
¥</li> |
| | | <li class="pam-header__dropdown-item pam-header__dropdown-divider" @click="$router.push('/consultantLogin')">é¡§åç»å
¥</li> |
| | | </el-dropdown-menu> |
| | | </el-dropdown> |
| | | </div> |
File was renamed from PAMapp/components/QuickFilter/QuickFilterConsultantCarousel.vue |
| | |
| | | @touchstart="touchStart" |
| | | @touchend="moveCard" |
| | | > |
| | | <img class="avator cursor--pointer" @click="$router.push('/agentInfo')" src="" /> |
| | | <div class="mdTxt mt-30 mb-10">è¡ç¾è(伯æ¨ä¿éªç¶ç´äºº)</div> |
| | | <el-avatar |
| | | :size="200" |
| | | class="mx-auto cursor--pointer" |
| | | @click="$router.push('/agentInfo')" |
| | | src="" |
| | | /> |
| | | <div class="mdTxt mt-30 mb-10 text--center">è¡ç¾è(伯æ¨ä¿éªç¶ç´äºº)</div> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <div class="smTxt_bold mb-10 text--prudential_grey">æåè³æ·</div> |
| | |
| | | <div class="p bold">#財åè¦å</div> |
| | | </div> |
| | | <div class="parallelBtns"> |
| | | <el-button @click="isVisibleDrawer = true"> |
| | | <el-button @click="addConsultant"> |
| | | <i class="icon-add smTxt"></i> |
| | | <span>顧忏
å®</span> |
| | | </el-button> |
| | |
| | | > |
| | | <div class="text--center mdTxt"> |
| | | <p class="mb-50">æåå å
¥é¡§åæ¸
å®</p> |
| | | <p class="text--primary" @click="isVisibleDrawer = false">æç¥éäº</p> |
| | | <p class="text--primary cursor--pointer" |
| | | @click="isVisibleDrawer = false">æç¥éäº</p> |
| | | </div> |
| | | </Ui-Drawer> |
| | | |
| | | <Ui-Dialog |
| | | :isVisible.sync="isVisibleDialog" |
| | | > |
| | | <div class="text--center mdTxt"> |
| | | <p class="mb-50">æåå å
¥é¡§åæ¸
å®</p> |
| | | <p class="text--primary cursor--pointer" |
| | | @click="isVisibleDialog = false">æç¥éäº</p> |
| | | </div> |
| | | </Ui-Dialog> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { ElCarousel } from 'element-ui/types/carousel'; |
| | | import { Vue, Component, Prop } from 'vue-property-decorator'; |
| | | import { Vue, Component } from 'vue-property-decorator'; |
| | | import { isMobileDevice } from '~/assets/ts/device'; |
| | | |
| | | @Component |
| | | export default class UiCardCarousel extends Vue { |
| | | export default class QuickFilterConsultantList extends Vue { |
| | | isVisibleDrawer = false; |
| | | isVisibleDialog = false; |
| | | startPosition = 0; |
| | | endPosition = 0; |
| | | |
| | |
| | | (this.$refs.carouselRef as ElCarousel).prev(); |
| | | } |
| | | |
| | | addConsultant() { |
| | | isMobileDevice() |
| | | ? this.isVisibleDrawer = true |
| | | : this.isVisibleDialog = true; |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | |
| | | padding: 20px 30px 30px 30px; |
| | | } |
| | | |
| | | .avator { |
| | | width: 200px; |
| | | height: 200px; |
| | | border-radius: 50%; |
| | | background-color: $MID_GREY; |
| | | .mx-auto { |
| | | margin: 0 auto; |
| | | } |
| | | |
| | |
| | | position: relative; |
| | | } |
| | | |
| | | .absolute { |
| | | .absolute { |
| | | position: absolute; |
| | | } |
| | | |
| | | @media (min-width: 768px) { |
| | | .relative { |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .arrow-right-position { |
| | | right: -20px; |
| | | } |
| | | |
| | | .arrow-left-position { |
| | | left: -20px; |
| | | } |
| | | } |
| | | |
| | | </style> |
File was renamed from PAMapp/components/QuickFilter/QuickFilterDrawer.vue |
| | |
| | | <template> |
| | | <Ui-Drawer |
| | | :isVisible.sync="isVisible" |
| | | :size="questionOption.name === 'style' ? '50%' : '30%'" |
| | | @close="closeDrawer" |
| | | > |
| | | <div> |
| | | <div class="mb-10" v-if="questionOption.title !== 'é¡§åæ§å¥'"> |
| | | <span class="mdTxt">{{questionOption.title === 'é¡§åæ»¿æåº¦' ? 'ä¿éªé¡§å滿æåº¦' : questionOption.title}}</span> |
| | | <span class="mdTxt" |
| | | >{{questionOption.title === 'é¡§åæ»¿æåº¦' ? 'ä¿éªé¡§å滿æåº¦' : questionOption.title}} |
| | | </span> |
| | | <span |
| | | class="smTxt_bold text--primary" |
| | | v-if="questionOption.name === 'style'" |
| | |
| | | </div> |
| | | |
| | | <div class="quickBtnBlock" v-if="questionOption.name === 'style'"> |
| | | <el-checkbox-group class="pam-quickFilter-checkbox" v-model="style"> |
| | | <el-checkbox-group class="pam-quickFilter-checkbox" v-model="pickedItem.style"> |
| | | <el-checkbox |
| | | v-for="(i, index) in questionOption.detail" |
| | | :key="index" |
| | |
| | | </div> |
| | | |
| | | <div class="quickBtnBlock" v-else-if="questionOption.name === 'gender'"> |
| | | <el-radio-group class="pam-quickFilter-radio" v-model="gender"> |
| | | <el-radio-group class="pam-quickFilter-radio" v-model="pickedItem.gender"> |
| | | <el-radio |
| | | v-for="(i, index) in questionOption.detail" |
| | | :key="index" |
| | |
| | | </div> |
| | | |
| | | <div class="quickBtnBlock" v-else-if="questionOption.name === 'loginState'"> |
| | | <el-radio-group class="pam-quickFilter-radio" v-model="loginState"> |
| | | <el-radio-group class="pam-quickFilter-radio" v-model="pickedItem.loginState"> |
| | | <el-radio |
| | | v-for="(i, index) in QuestionOption.detail" |
| | | :key="index" |
| | |
| | | </div> |
| | | |
| | | <div v-else> |
| | | <el-rate class="pam-quickFilter-rate" v-model="satisfaction"></el-rate> |
| | | <el-rate class="pam-quickFilter-rate" v-model="pickedItem.satisfaction"></el-rate> |
| | | </div> |
| | | </Ui-Drawer> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | |
| | | |
| | | @Component |
| | | export default class QuickFilterDrawer extends Vue { |
| | | style: string[] = []; |
| | | loginState: string = ''; |
| | | gender: string = ''; |
| | | satisfaction: number = 0; |
| | | |
| | | pickedItem: selectedItem = { |
| | | style: [], |
| | | onlineState: '', |
| | | gender: '', |
| | | satisfaction: 0 |
| | | } |
| | | |
| | | @PropSync('drawerVisible') isVisible!: boolean; |
| | | @Prop() selectedItem!: selectedItem; |
| | | @Prop() questionOption!: QuestionOption; |
| | | |
| | | @Emit('selected') emitSelected() { |
| | | return ({ |
| | | name: this.questionOption.name, |
| | | gender: this.gender, |
| | | style: this.style, |
| | | satisfaction: this.satisfaction, |
| | | loginState: this.loginState |
| | | }); |
| | | } |
| | | |
| | | closeDrawer() { |
| | | this.emitSelected() |
| | | } |
| | | |
| | | @Watch('selectedItem', {deep: true, immediate: true}) watchSelected(newValue: selectedItem) { |
| | | if (newValue) { |
| | | this.gender = newValue.gender; |
| | | this.style = newValue.style; |
| | | this.satisfaction = newValue.satisfaction; |
| | | this.pickedItem = JSON.parse(JSON.stringify(this.selectedItem)) |
| | | } |
| | | } |
| | | } |
| | |
| | | <el-dialog |
| | | title="" |
| | | :visible.sync="dialogVisible" |
| | | width="80%" |
| | | :width="width" |
| | | @close="close" |
| | | > |
| | | <slot></slot> |
| | | </el-dialog> |
| | |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, PropSync } from 'vue-property-decorator'; |
| | | import { Vue, Component, PropSync, Prop, Emit } from 'vue-property-decorator'; |
| | | |
| | | @Component |
| | | export default class UiDialog extends Vue { |
| | | @PropSync('isVisible') dialogVisible!: boolean |
| | | @PropSync('isVisible') dialogVisible!: boolean; |
| | | @Prop() width!: string; |
| | | |
| | | @Emit('closeDialog') closeDialog() { |
| | | return; |
| | | } |
| | | |
| | | close() { |
| | | this.closeDialog(); |
| | | } |
| | | } |
| | | </script> |
| | |
| | | :visible.sync="drawerVisible" |
| | | :direction="'btt'" |
| | | @close="close" |
| | | class="cus_drawer" |
| | | > |
| | | <div class="close" @click="drawerVisible = false"></div> |
| | | <slot></slot> |
| | |
| | | @PropSync('isVisible') drawerVisible!: boolean; |
| | | @Prop() size!: number; |
| | | |
| | | @Emit('close') closeDrawer() { |
| | | @Emit('closeDrawer') closeDrawer() { |
| | | return; |
| | | } |
| | | |
| | |
| | | <template> |
| | | <el-pagination |
| | | :current-page.sync="currentPage" |
| | | layout="prev, pager, next" |
| | | :total="totalList.length" |
| | | :page-size="pageSize" |
| | | @current-change="handleCurrentChange" |
| | | class="mt-10" |
| | | > |
| | | </el-pagination> |
| | | </template> |
| | |
| | | } |
| | | |
| | | handleCurrentChange(currentPage: number) { |
| | | |
| | | if (this.totalList.length <= this.pageSize && currentPage !== 1) { |
| | | currentPage -= 1; |
| | | } |
| | | |
| | | if (this.totalList) { |
| | | this.pageList = this.totalList.slice(this.pageSize * currentPage - this.pageSize, this.pageSize * currentPage) |
| | | this.chagnePage(); |
¤ñ¹ï·sÀÉ®× |
| | |
| | | <template> |
| | | <el-tag |
| | | class="pam-tag p" |
| | | closable |
| | | type="''" |
| | | @close="removeTag" |
| | | :disable-transitions="true" |
| | | > |
| | | <slot></slot> |
| | | </el-tag> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Emit } from 'nuxt-property-decorator'; |
| | | |
| | | @Component |
| | | export default class UiTags extends Vue { |
| | | |
| | | @Emit('removeTag') removeTag() { |
| | | return; |
| | | } |
| | | |
| | | remove() { |
| | | this.removeTag(); |
| | | } |
| | | } |
| | | </script> |
¤ñ¹ï·sÀÉ®× |
| | |
| | | <template> |
| | | <div> |
| | | <div class="pam-cus-tabs mb-30"> |
| | | <div |
| | | class="cus-tab-item" |
| | | :class="{'is-active': activeTabName === 'reservedList'}" |
| | | @click="tabClick('reservedList')" |
| | | >客æ¶é ç´ |
| | | <span class="p">({{reservedList.length}})</span> |
| | | </div> |
| | | <div |
| | | class="cus-tab-item" |
| | | :class="{'is-active': activeTabName === 'contactedList'}" |
| | | @click="tabClick('contactedList')" |
| | | >å·²è¯çµ¡ |
| | | <span class="p">({{contactedList.length}})</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <NuxtChild |
| | | :contactedList="contactedList" |
| | | :reservedList="reservedList" |
| | | ></NuxtChild> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Context } from '@nuxt/types'; |
| | | import { Vue, Component } from 'nuxt-property-decorator'; |
| | | |
| | | @Component |
| | | export default class ClientReservedList extends Vue { |
| | | activeTabName = 'reservedList'; |
| | | reservedList: Clients[] = []; |
| | | contactedList: Clients[] = []; |
| | | clients: Clients[] = []; |
| | | |
| | | async asyncData(context: Context) { |
| | | let reservedList: Clients[] = []; |
| | | let contactedList: Clients[] = []; |
| | | let clients: Clients[] = []; |
| | | |
| | | await context.$service.home.clientReservedList().then((result: Clients[]) => { |
| | | clients = result; |
| | | }) |
| | | |
| | | contactedList = clients.filter(item => item.communicateStatus === 'contacted'); |
| | | reservedList = clients.filter(item => item.communicateStatus === 'reserved'); |
| | | |
| | | return { |
| | | clients, |
| | | contactedList, |
| | | reservedList |
| | | } |
| | | } |
| | | |
| | | tabClick(path: string) { |
| | | this.activeTabName = path; |
| | | this.$router.push('/clientReservedList/' + this.activeTabName) |
| | | } |
| | | } |
| | | |
| | | export interface Clients { |
| | | name: string, |
| | | clientId: string, |
| | | phone: string, |
| | | time: Date, |
| | | gender: string, |
| | | age: string, |
| | | job: string, |
| | | requirements: string[], |
| | | communicateStatus: string |
| | | } |
| | | </script> |
¤ñ¹ï·sÀÉ®× |
| | |
| | | <template> |
| | | <div> |
| | | <ClientList |
| | | :clients="pageList" |
| | | :title="'contactedList'" |
| | | ></ClientList> |
| | | |
| | | <UiPagination |
| | | :totalList="contactedList" |
| | | @changePage="changePage" |
| | | ></UiPagination> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop } from 'nuxt-property-decorator'; |
| | | import { Clients } from '../clientReservedList.vue'; |
| | | |
| | | @Component |
| | | export default class ClientContactedList extends Vue { |
| | | @Prop() contactedList!: Clients[]; |
| | | pageList: Clients[] = []; |
| | | |
| | | changePage(pageList: Clients[]) { |
| | | this.pageList = pageList; |
| | | } |
| | | } |
| | | </script> |
¤ñ¹ï·sÀÉ®× |
| | |
| | | <template> |
| | | <div> |
| | | <ClientList |
| | | :clients="pageList" |
| | | :title="'reservedList'" |
| | | ></ClientList> |
| | | |
| | | <UiPagination |
| | | :totalList="reservedList" |
| | | @changePage="changePage" |
| | | ></UiPagination> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component, Prop } from 'nuxt-property-decorator'; |
| | | import { Clients } from '../clientReservedList.vue'; |
| | | |
| | | @Component |
| | | export default class ClientReservedList extends Vue { |
| | | @Prop() reservedList!: Clients[]; |
| | | pageList: Clients[] = []; |
| | | |
| | | changePage(pageList: Clients[]) { |
| | | this.pageList = pageList; |
| | | } |
| | | } |
| | | </script> |
¤ñ¹ï·sÀÉ®× |
| | |
| | | <template> |
| | | <div> |
| | | <div class="pam-consultant-login"> |
| | | <div class="pam-consultant-login__header mt-30">é¡§åç»å
¥</div> |
| | | <div class="pam-consultant-login__title mt-30">帳è</div> |
| | | <div class="position-r mt-10"> |
| | | <input type="text" |
| | | :model="loginDto.account" |
| | | class="pam-consultant-login__input" |
| | | placeholder="輸å
¥eService帳è"> |
| | | <div class="pam-consultant-login__inputIcon text--primary cursor--pointer" @click="cookieAccount"> |
| | | <i :class="[isRemember ? 'icon-checkbox-1' : 'icon-checkbox','pr-5']"></i> |
| | | è¨ä½ |
| | | </div> |
| | | </div> |
| | | <div class="pam-consultant-login__title mt-30"> |
| | | <div>å¯ç¢¼</div> |
| | | <div class="text--primary fs-16 cursor--pointer" @click="forgetPassword">å¿è¨å¯ç¢¼ï¼</div> |
| | | </div> |
| | | <div class="position-r mt-10"> |
| | | <input :type="[isShowPassword ? 'text' : 'password']" |
| | | :model="loginDto.password" |
| | | class="pam-consultant-login__input" |
| | | placeholder="輸å
¥eServiceå¯ç¢¼"> |
| | | <div class="pam-consultant-login__inputIcon cursor--pointer" @click="isShowPassword = !isShowPassword"> |
| | | <i :class="[isShowPassword ? 'icon-eye-1 fs-25' : 'icon-eye' , 'text--primary']"></i> |
| | | </div> |
| | | </div> |
| | | <div class="pam-consultant-login__title mt-30"> |
| | | <div>é©è碼</div> |
| | | <div class="text--dark-blue fs-16 cursor--pointer" @click="regenerateCode">éæ°ç¢ç</div> |
| | | </div> |
| | | <div class="pam-consultant-login__verifyBlock mt-10"> |
| | | <div class="w-55"> |
| | | <input type="text" |
| | | :modal="loginDto.verificationCode" |
| | | class="pam-consultant-login__input" > |
| | | </div> |
| | | <div class="pam-consultant-login__verifyImg"></div> |
| | | </div> |
| | | <div class="pam-consultant-login__confirmBlock mt-30"> |
| | | <button class="pam-consultant-login__confirm cursor--pointer" @click="login">éåº</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script lang="ts"> |
| | | import { Vue, Component } from 'vue-property-decorator'; |
| | | |
| | | @Component({ |
| | | layout:'home' |
| | | }) |
| | | export default class ConsultantLogin extends Vue { |
| | | isRemember=false; |
| | | isShowPassword=false; |
| | | loginDto={ |
| | | account:'', |
| | | password:'', |
| | | verificationCode:'', |
| | | } |
| | | |
| | | |
| | | login():void{ |
| | | console.log('login'); |
| | | } |
| | | |
| | | cookieAccount():void{ |
| | | this.isRemember = !this.isRemember; |
| | | if(this.isRemember){ |
| | | console.log('sotre account'); |
| | | } |
| | | } |
| | | |
| | | forgetPassword():void{ |
| | | console.log('forget password'); |
| | | } |
| | | |
| | | regenerateCode():void{ |
| | | console.log('call api regenerate verificationCode') |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .mt-20{ |
| | | margin-top: 20px; |
| | | } |
| | | .mt-25{ |
| | | margin-top: 25px; |
| | | } |
| | | .w-55{ |
| | | width: 55% !important; |
| | | } |
| | | .position-r{ |
| | | position: relative; |
| | | } |
| | | .pam-consultant-login{ |
| | | width: 336px; |
| | | margin: 40px auto 30px auto; |
| | | font-size: 20px; |
| | | color: $PRIMARY_BLACK; |
| | | &__header{ |
| | | text-align: center; |
| | | font-size: 24px; |
| | | font-weight: bold; |
| | | letter-spacing: 1.2; |
| | | color: $PRIMARY_BLACK; |
| | | } |
| | | &__title{ |
| | | display:flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 0px 10px; |
| | | } |
| | | &__input{ |
| | | width: 100%; |
| | | outline: 0; |
| | | border: 1px solid #CCCCCC; |
| | | border-radius: 10px; |
| | | font-size: 20px; |
| | | height: 50px; |
| | | padding: 10px 90px 10px 15px; |
| | | overflow: auto; |
| | | box-sizing: border-box; |
| | | -webkit-box-sizing: border-box; |
| | | -moz-box-sizing: border-box; |
| | | |
| | | &Icon{ |
| | | position: absolute; |
| | | display: flex; |
| | | align-items: center; |
| | | top: 15px; |
| | | right: 15px; |
| | | } |
| | | } |
| | | &__verifyBlock{ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | &__verifyImg{ |
| | | width:126px; |
| | | border:1px black solid; |
| | | } |
| | | &__confirmBlock{ |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | &__confirm{ |
| | | color: $PRIMARY_WHITE; |
| | | width: 80px; |
| | | height: 50px; |
| | | border-radius: 30px; |
| | | border: 1px solid $LIGHT_GREY; |
| | | background-color:$PRIMARY_RED; |
| | | } |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <div> |
| | | <div class="flex mb-30"> |
| | | <div class="pam-cus-tabs mb-30"> |
| | | <div |
| | | class="cus-tab-item" |
| | | :class="{'is-active': activeTabName === 'consultantList'}" |
| | |
| | | } |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .flex { |
| | | display: flex; |
| | | width: 100%; |
| | | height: 45px; |
| | | |
| | | .cus-tab-item { |
| | | width: 50%; |
| | | text-align: center; |
| | | font-size: 24px; |
| | | border-bottom: solid 3px $LIGHT_GREY; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .is-active { |
| | | font-weight: bold; |
| | | border-bottom: solid 3px $PRIMARY_BLACK; |
| | | |
| | | } |
| | | } |
| | | |
| | | </style> |
| | | </script> |
| | |
| | | class="subTitle quickBtn" |
| | | :disabled="question.name === 'onlineState'" |
| | | |
| | | @click="openDrawer(question)" |
| | | @click="openPopUp(question)" |
| | | >{{question.title}}</el-button> |
| | | </div> |
| | | |
| | | <h5 class="mdTxt mb-10 mt-30">ç¯©é¸æ¢ä»¶</h5> |
| | | <div> |
| | | <el-tag |
| | | <Ui-Tags |
| | | v-if="selectedItem.gender" |
| | | class="pam-tag p" |
| | | closable |
| | | type="''" |
| | | @close="removeTag('gender')" |
| | | >{{selectedItem.gender}}</el-tag> |
| | | <el-tag |
| | | v-if="selectedItem.satisfaction" |
| | | class="pam-tag p" |
| | | closable |
| | | type="''" |
| | | @close="removeTag('satisfaction')" |
| | | >{{selectedItem.satisfaction + 'æä»¥ä¸æ»¿æåº¦'}}</el-tag> |
| | | |
| | | <template v-if="selectedItem.style.length > 0" |
| | | @removeTag="removeTag('gender')" |
| | | > |
| | | <el-tag |
| | | {{selectedItem.gender}} |
| | | </Ui-Tags> |
| | | <Ui-Tags |
| | | v-if="selectedItem.satisfaction" |
| | | @removeTag="removeTag('satisfaction')" |
| | | > |
| | | {{selectedItem.satisfaction + 'æä»¥ä¸æ»¿æåº¦'}} |
| | | </Ui-Tags> |
| | | <template v-if="selectedItem.style.length > 0"> |
| | | <Ui-Tags |
| | | v-for="(item, index) in selectedItem.style" |
| | | :key="index" |
| | | class="pam-tag p" |
| | | closable |
| | | type="''" |
| | | @close="removeTag('style', index)" |
| | | >{{item}}</el-tag> |
| | | @removeTag="removeTag('style', index)" |
| | | > |
| | | {{item}} |
| | | </Ui-Tags> |
| | | </template> |
| | | |
| | | <div class="mb-10" v-if="selectedItem.onlineState"></div> |
| | |
| | | |
| | | <h5 class="mdTxt mb-10 mt-30">å¿«éç¯©é¸æ¨è¦</h5> |
| | | <template v-if="consultantList.length > 0"> |
| | | <QuickFilterConsultantCarousel></QuickFilterConsultantCarousel> |
| | | <QuickFilterConsultantList></QuickFilterConsultantList> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <div class="emptyBox bg-white"></div> |
| | | </template> |
| | | |
| | | <QuickFilterDrawer |
| | | :drawerVisible.sync="questionDrawer" |
| | | :questionOption="questionOption" |
| | | :selectedItem="selectedItem" |
| | | @selected="selected" |
| | | ></QuickFilterDrawer> |
| | | <Ui-Drawer |
| | | :isVisible.sync="questionDrawer" |
| | | :size="questionOption.name === 'style' ? '50%' : '30%'" |
| | | @closeDrawer="closePopUp" |
| | | > |
| | | <QuickFilterSelector |
| | | ref="quickFilterRef" |
| | | :drawerVisible.sync="questionDrawer" |
| | | :questionOption="questionOption" |
| | | :selectedItem="selectedItem" |
| | | ></QuickFilterSelector> |
| | | </Ui-Drawer> |
| | | |
| | | <Ui-Dialog :isVisible.sync="dialog" |
| | | @closeDialog="closePopUp" |
| | | > |
| | | <QuickFilterSelector |
| | | ref="quickFilterRef" |
| | | :drawerVisible.sync="questionDrawer" |
| | | :questionOption="questionOption" |
| | | :selectedItem="selectedItem" |
| | | ></QuickFilterSelector> |
| | | </Ui-Dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import { Context } from '@nuxt/types'; |
| | | import { Vue, Component } from 'nuxt-property-decorator'; |
| | | import { Agents } from '~/plugins/api/home'; |
| | | import { isMobileDevice } from '~/assets/ts/device'; |
| | | import QuickFilterDrawer from '~/components/QuickFilter/QuickFilterSelector.vue'; |
| | | |
| | | @Component |
| | | export default class QuickFilter extends Vue { |
| | | dialog = false; |
| | | consultantList = []; |
| | | questionDrawer = false; |
| | | questionOption = {}; |
| | |
| | | } |
| | | } |
| | | |
| | | openDrawer(question: QuestionOption) { |
| | | this.questionDrawer = true; |
| | | openPopUp(question: QuestionOption) { |
| | | this.questionOption = question; |
| | | } |
| | | |
| | | selected(event: selectedItem) { |
| | | |
| | | const name = event.name; |
| | | if (name === 'gender') { |
| | | this.selectedItem.gender = event.gender; |
| | | } |
| | | |
| | | if (name === 'satisfaction') { |
| | | this.selectedItem.satisfaction = event.satisfaction; |
| | | } |
| | | |
| | | if (name === 'style'){ |
| | | this.selectedItem.style = event.style; |
| | | } |
| | | |
| | | isMobileDevice() ? this.questionDrawer = true : this.dialog = true; |
| | | } |
| | | |
| | | removeTag(type: string, index: number = 0) { |
| | |
| | | |
| | | } |
| | | |
| | | closePopUp() { |
| | | this.selectedItem = JSON.parse(JSON.stringify((this.$refs.quickFilterRef as QuickFilterDrawer).pickedItem)); |
| | | } |
| | | |
| | | } |
| | | |
| | | export interface QuestionOption { |
| | |
| | | new: true, |
| | | agentNo: 0, |
| | | name: 'å¼µå°ç¾', |
| | | img: 'https://randomuser.me/api/portraits/women/31.jpg', |
| | | img: '', |
| | | professionals: ['財åè¦å', 'è³ç¢è½ç§»'], |
| | | satisfaction: 4.8, |
| | | contactStatus: 'reserved', |
| | |
| | | new: true, |
| | | agentNo: 1, |
| | | name: 'è£å¸¥å¥', |
| | | img: 'https://randomuser.me/api/portraits/men/32.jpg', |
| | | img: '', |
| | | professionals: [], |
| | | satisfaction: 4, |
| | | contactStatus: 'contacted', |
| | |
| | | new: false, |
| | | agentNo: 2, |
| | | name: 'æç¾å¥³', |
| | | img: 'https://randomuser.me/api/portraits/women/33.jpg', |
| | | img: '', |
| | | professionals: ['財åè¦å', 'è³ç¢è½ç§»'], |
| | | satisfaction: 5, |
| | | contactStatus: 'picked', |
| | |
| | | new: false, |
| | | agentNo: 3, |
| | | name: 'è¡ç¾ç', |
| | | img: 'https://randomuser.me/api/portraits/women/34.jpg', |
| | | img: '', |
| | | professionals: ['財åè¦å', 'è³ç¢è½ç§»'], |
| | | satisfaction: 4.3, |
| | | contactStatus: 'picked', |
| | |
| | | new: true, |
| | | agentNo: 4, |
| | | name: 'å¼µå°ç¾', |
| | | img: 'https://randomuser.me/api/portraits/women/35.jpg', |
| | | img: '', |
| | | professionals: [], |
| | | satisfaction: 4.8, |
| | | contactStatus: 'picked', |
| | |
| | | new: true, |
| | | agentNo: 5, |
| | | name: 'è£å¸¥å¥', |
| | | img: 'https://randomuser.me/api/portraits/men/36.jpg', |
| | | img: '', |
| | | professionals: ['財åè¦å', 'è³ç¢è½ç§»'], |
| | | satisfaction: 4.8, |
| | | contactStatus: 'reserved', |
| | |
| | | new: false, |
| | | agentNo: 6, |
| | | name: 'æç¾å¥³', |
| | | img: 'https://randomuser.me/api/portraits/women/37.jpg', |
| | | img: '', |
| | | professionals: ['財åè¦å', 'è³ç¢ç§»è½', 'ç¯ç¨
', 'æ¨æ´»éä¼'], |
| | | satisfaction: 4.8, |
| | | contactStatus: 'picked', |
| | |
| | | new: false, |
| | | agentNo: 7, |
| | | name: 'è¡ç¾ç', |
| | | img: 'https://randomuser.me/api/portraits/women/38.jpg', |
| | | img: '', |
| | | professionals: ['財åè¦å', 'ç¯ç¨
', 'æ¨æ´»éä¼'], |
| | | satisfaction: 4.8, |
| | | contactStatus: 'picked', |
| | | updateTime: 'Tue Sep 02 2021 09:40:02 GMT+0800 (å°åæ¨æºæé)' |
| | | } |
| | | ] |
| | | return CommonService.prototype.withDebugData(debugData, 'https://randomuser.me/api/') |
| | | return CommonService.prototype.withDebugData(debugData, '') |
| | | }, |
| | | clientReservedList() { |
| | | const debugData = [{ |
| | | name: 'çè°æ', |
| | | clientId: '1', |
| | | phone: '091234567', |
| | | time: new Date('Tue Nov 02 2021 11:23:14 GMT+0800 (å°åæ¨æºæé)'), |
| | | gender: 'male', |
| | | age: '26-30', |
| | | job: 'general', |
| | | requirements: ['ä¿å®å¥æª¢/è¦å', 'é²ç«ä¿å®ç¸é'], |
| | | communicateStatus: 'reserved' |
| | | },{ |
| | | name: 'Ariel', |
| | | clientId: '2', |
| | | phone: '091234567', |
| | | time: new Date('Tue Oct 15 2020 11:23:14 GMT+0800 (å°åæ¨æºæé)'), |
| | | gender: 'female', |
| | | age: '30-40', |
| | | job: 'general', |
| | | requirements: ['ä¿å®å¥æª¢/è¦å', 'è³ç¢è½ç§»', 'é²ç«ä¿å®ç¸é'], |
| | | communicateStatus: 'contacted' |
| | | },{ |
| | | name: 'Donna', |
| | | clientId: '3', |
| | | phone: '091234567', |
| | | time: new Date('Tue Oct 31 2021 10:23:14 GMT+0800 (å°åæ¨æºæé)'), |
| | | gender: 'female', |
| | | age: '10-20', |
| | | job: 'general', |
| | | requirements: ['é²ç«ä¿å®ç¸é'], |
| | | communicateStatus: 'reserved' |
| | | },{ |
| | | name: 'é³ç¸ç¸', |
| | | clientId: '4', |
| | | phone: '091234567', |
| | | time: new Date('Tue Dec 31 2020 19:23:14 GMT+0800 (å°åæ¨æºæé)'), |
| | | gender: 'female', |
| | | age: '50-60', |
| | | job: 'general', |
| | | requirements: ['è³ç¢è½ç§»', 'ç¯ç¨
'], |
| | | communicateStatus: 'reserved' |
| | | },{ |
| | | name: 'æä¼¯ä¼¯', |
| | | clientId: '5', |
| | | phone: '091234567', |
| | | time: new Date('Tue Oct 15 2020 11:23:14 GMT+0800 (å°åæ¨æºæé)'), |
| | | gender: 'male', |
| | | age: '60-70', |
| | | job: 'general', |
| | | requirements: ['ç¯ç¨
', 'è³ç¢è½ç§»', 'é²ç«ä¿å®ç¸é'], |
| | | communicateStatus: 'contacted' |
| | | },{ |
| | | name: 'è¡åª½åª½', |
| | | clientId: '6', |
| | | phone: '091234567', |
| | | time: new Date('Tue Dec 31 2020 19:23:14 GMT+0800 (å°åæ¨æºæé)'), |
| | | gender: 'female', |
| | | age: '50-60', |
| | | job: 'general', |
| | | requirements: [], |
| | | communicateStatus: 'reserved' |
| | | }] |
| | | |
| | | return CommonService.prototype.withDebugData(debugData, '') |
| | | } |
| | | }) |
| | | |
| | |
| | | <properties> |
| | | <!-- Build properties --> |
| | | <maven.version>3.3.9</maven.version> |
| | | <java.version>11</java.version> |
| | | <java.version>8</java.version> |
| | | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| | | <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
| | | <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format> |
¤ñ¹ï·sÀÉ®× |
| | |
| | | CREATE TABLE public.consultant ( |
| | | id serial4 NOT NULL, |
| | | agent_no varchar NOT NULL, |
| | | "name" varchar NULL, |
| | | photo_path varchar NULL, |
| | | expertise varchar NULL, |
| | | avg_score float4 NULL, |
| | | title varchar NULL, |
| | | "role" varchar NULL, |
| | | created_date timestamp NULL, |
| | | created_by varchar NULL, |
| | | last_modified_date timestamp NULL, |
| | | last_modified_by varchar NULL, |
| | | serve_area varchar NULL, |
| | | gender varchar NULL, |
| | | phone_number varchar NULL, |
| | | company_address varchar NULL, |
| | | latest_login_time timestamp NULL, |
| | | seniority varchar NULL, |
| | | concept varchar NULL, |
| | | experience varchar NULL, |
| | | award varchar NULL, |
| | | recommend bool NULL, |
| | | CONSTRAINT consultant_pkey PRIMARY KEY (id) |
| | | ); |
| | |
| | | .antMatchers("/api/activate").permitAll() |
| | | .antMatchers("/api/account/reset-password/init").permitAll() |
| | | .antMatchers("/api/account/reset-password/finish").permitAll() |
| | | .antMatchers("/api/consultant/recommend").permitAll() |
| | | .antMatchers("/api/admin/**").hasAuthority(AuthoritiesConstants.ADMIN) |
| | | .antMatchers("/api/**").authenticated() |
| | | .antMatchers("/websocket/**").authenticated() |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.domain; |
| | | |
| | | import com.pollex.pam.enums.GenderEnum; |
| | | |
| | | import javax.persistence.*; |
| | | import java.io.Serializable; |
| | | import java.time.Instant; |
| | | |
| | | @Entity |
| | | @Table(name = "consultant") |
| | | public class Consultant extends AbstractAuditingEntity implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @Id |
| | | @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") |
| | | @SequenceGenerator(name = "sequenceGenerator") |
| | | private Long id; |
| | | |
| | | @Column(name = "agent_no") |
| | | private String agentNo; |
| | | |
| | | @Column(name = "name") |
| | | private String name; |
| | | |
| | | @Column(name = "photo_path") |
| | | private String photoPath; |
| | | |
| | | @Column(name = "expertise") |
| | | private String expertise; |
| | | |
| | | @Column(name = "avg_score") |
| | | private Float avgScore; |
| | | |
| | | @Column(name = "title") |
| | | private String title; |
| | | |
| | | @Column(name = "role") |
| | | private String role; |
| | | |
| | | @Column(name = "serve_area") |
| | | private String serveArea; |
| | | |
| | | @Enumerated(value = EnumType.STRING) |
| | | @Column(name = "gender") |
| | | private GenderEnum gender; |
| | | |
| | | @Column(name = "phone_number") |
| | | private String phoneNumber; |
| | | |
| | | @Column(name = "company_address") |
| | | private String companyAddress; |
| | | |
| | | @Column(name = "latest_login_time") |
| | | private Instant latestLoginTime; |
| | | |
| | | @Column(name = "seniority") |
| | | private String seniority; |
| | | |
| | | @Column(name = "concept") |
| | | private String concept; |
| | | |
| | | @Column(name = "experience") |
| | | private String experience; |
| | | |
| | | @Column(name = "award") |
| | | private String award; |
| | | |
| | | @Column(name = "recommend") |
| | | private Boolean recommend; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getAgentNo() { |
| | | return agentNo; |
| | | } |
| | | |
| | | public void setAgentNo(String agentNo) { |
| | | this.agentNo = agentNo; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getPhotoPath() { |
| | | return photoPath; |
| | | } |
| | | |
| | | public void setPhotoPath(String photoPath) { |
| | | this.photoPath = photoPath; |
| | | } |
| | | |
| | | public String getExpertise() { |
| | | return expertise; |
| | | } |
| | | |
| | | public void setExpertise(String expertise) { |
| | | this.expertise = expertise; |
| | | } |
| | | |
| | | public Float getAvgScore() { |
| | | return avgScore; |
| | | } |
| | | |
| | | public void setAvgScore(Float avgScore) { |
| | | this.avgScore = avgScore; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public String getRole() { |
| | | return role; |
| | | } |
| | | |
| | | public void setRole(String role) { |
| | | this.role = role; |
| | | } |
| | | |
| | | public String getServeArea() { |
| | | return serveArea; |
| | | } |
| | | |
| | | public void setServeArea(String serveArea) { |
| | | this.serveArea = serveArea; |
| | | } |
| | | |
| | | public GenderEnum getGender() { |
| | | return gender; |
| | | } |
| | | |
| | | public void setGender(GenderEnum gender) { |
| | | this.gender = gender; |
| | | } |
| | | |
| | | public String getPhoneNumber() { |
| | | return phoneNumber; |
| | | } |
| | | |
| | | public void setPhoneNumber(String phoneNumber) { |
| | | this.phoneNumber = phoneNumber; |
| | | } |
| | | |
| | | public String getCompanyAddress() { |
| | | return companyAddress; |
| | | } |
| | | |
| | | public void setCompanyAddress(String companyAddress) { |
| | | companyAddress = companyAddress; |
| | | } |
| | | |
| | | public Instant getLatestLoginTime() { |
| | | return latestLoginTime; |
| | | } |
| | | |
| | | public void setLatestLoginTime(Instant lastLoginTime) { |
| | | this.latestLoginTime = lastLoginTime; |
| | | } |
| | | |
| | | public String getSeniority() { |
| | | return seniority; |
| | | } |
| | | |
| | | public void setSeniority(String seniority) { |
| | | this.seniority = seniority; |
| | | } |
| | | |
| | | public String getConcept() { |
| | | return concept; |
| | | } |
| | | |
| | | public void setConcept(String concept) { |
| | | this.concept = concept; |
| | | } |
| | | |
| | | public String getExperience() { |
| | | return experience; |
| | | } |
| | | |
| | | public void setExperience(String experience) { |
| | | this.experience = experience; |
| | | } |
| | | |
| | | public String getAward() { |
| | | return award; |
| | | } |
| | | |
| | | public void setAward(String award) { |
| | | this.award = award; |
| | | } |
| | | |
| | | public Boolean getRecommend() { |
| | | return recommend; |
| | | } |
| | | |
| | | public void setRecommend(Boolean recommend) { |
| | | this.recommend = recommend; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "Consultant{" + |
| | | "id=" + id + |
| | | ", agentNo='" + agentNo + '\'' + |
| | | ", name='" + name + '\'' + |
| | | ", photoPath='" + photoPath + '\'' + |
| | | ", expertise='" + expertise + '\'' + |
| | | ", avgScore=" + avgScore + |
| | | ", title='" + title + '\'' + |
| | | ", role='" + role + '\'' + |
| | | ", serveArea='" + serveArea + '\'' + |
| | | ", gender='" + gender + '\'' + |
| | | ", phoneNumber='" + phoneNumber + '\'' + |
| | | ", companyAddress='" + companyAddress + '\'' + |
| | | ", latestLoginTime=" + latestLoginTime + |
| | | ", seniority='" + seniority + '\'' + |
| | | ", concept='" + concept + '\'' + |
| | | ", experience='" + experience + '\'' + |
| | | ", award='" + award + '\'' + |
| | | ", recommend=" + recommend + |
| | | '}'; |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.enums; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | |
| | | public enum ContactStatusEnum { |
| | | @JsonProperty("picked") |
| | | PICKED, |
| | | |
| | | @JsonProperty("reserved") |
| | | RESERVED, |
| | | |
| | | @JsonProperty("contacted") |
| | | CONTACTED |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.enums; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | |
| | | public enum GenderEnum { |
| | | |
| | | @JsonProperty("male") |
| | | MALE, |
| | | |
| | | @JsonProperty("female") |
| | | FEMALE |
| | | |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.repository; |
| | | |
| | | import com.pollex.pam.domain.Consultant; |
| | | import org.springframework.data.jpa.repository.JpaRepository; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | | |
| | | @Repository |
| | | public interface ConsultantRepository extends JpaRepository<Consultant, Long> { |
| | | Optional<Consultant> findFirstByAgentNo(String agentNo); |
| | | List<Consultant> findAllByRecommendIsTrue(); |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.service; |
| | | |
| | | import com.pollex.pam.domain.Consultant; |
| | | import com.pollex.pam.repository.ConsultantRepository; |
| | | import com.pollex.pam.service.dto.*; |
| | | import com.pollex.pam.service.mapper.ConsultantMapper; |
| | | import com.pollex.pam.web.rest.errors.ConsultantNotFoundException; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class ConsultantService { |
| | | |
| | | private final ConsultantRepository consultantRepository; |
| | | private final ConsultantMapper consultantMapper; |
| | | |
| | | public ConsultantService(ConsultantRepository consultantRepository, ConsultantMapper consultantMapper) { |
| | | this.consultantRepository = consultantRepository; |
| | | this.consultantMapper = consultantMapper; |
| | | } |
| | | |
| | | public List<ConsultantDTO> getMyConsultantList() { |
| | | return Collections.emptyList(); |
| | | } |
| | | |
| | | public List<ConsultantDTO> getRecommendConsultantList() { |
| | | List<Consultant> recommendConsultantList = consultantRepository.findAllByRecommendIsTrue(); |
| | | return consultantMapper.toDto(recommendConsultantList); |
| | | } |
| | | |
| | | public void addConsultantToOwnList(AddConsultantParam param) { |
| | | List<String> agentNoList = param.getAgentNoList(); |
| | | } |
| | | |
| | | public List<ConsultantDTO> strictQueryConsultant(StrictQueryConsultantParam param) { |
| | | return Collections.emptyList(); |
| | | } |
| | | |
| | | public List<ConsultantDTO> fastQueryConsultant(FastQueryConsultantParam param) { |
| | | return Collections.emptyList(); |
| | | } |
| | | |
| | | public ConsultantDetailDTO getConsultantDetail(String agentNo) { |
| | | Consultant consultant = consultantRepository.findFirstByAgentNo(agentNo).orElseThrow(ConsultantNotFoundException::new); |
| | | return consultantMapper.toDetailDto(consultant); |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.service.dto; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class AddConsultantParam { |
| | | List<String> agentNoList; |
| | | |
| | | public List<String> getAgentNoList() { |
| | | return agentNoList; |
| | | } |
| | | |
| | | public void setAgentNoList(List<String> agentNoList) { |
| | | this.agentNoList = agentNoList; |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.service.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import com.pollex.pam.enums.ContactStatusEnum; |
| | | |
| | | import java.time.Instant; |
| | | import java.util.List; |
| | | |
| | | public class ConsultantDTO { |
| | | |
| | | @JsonProperty("new") |
| | | private boolean newConsultant; |
| | | private String agentNo; |
| | | private String name; |
| | | private String img; |
| | | private List<String> expertise; |
| | | private Float avgScore; |
| | | private ContactStatusEnum contactStatus; |
| | | private Instant updateTime; |
| | | private String seniority; |
| | | |
| | | public boolean isNewConsultant() { |
| | | return newConsultant; |
| | | } |
| | | |
| | | public void setNewConsultant(boolean newConsultant) { |
| | | this.newConsultant = newConsultant; |
| | | } |
| | | |
| | | public String getAgentNo() { |
| | | return agentNo; |
| | | } |
| | | |
| | | public void setAgentNo(String agentNo) { |
| | | this.agentNo = agentNo; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getImg() { |
| | | return img; |
| | | } |
| | | |
| | | public void setImg(String img) { |
| | | this.img = img; |
| | | } |
| | | |
| | | public List<String> getExpertise() { |
| | | return expertise; |
| | | } |
| | | |
| | | public void setExpertise(List<String> expertise) { |
| | | this.expertise = expertise; |
| | | } |
| | | |
| | | public Float getAvgScore() { |
| | | return avgScore; |
| | | } |
| | | |
| | | public void setAvgScore(Float avgScore) { |
| | | this.avgScore = avgScore; |
| | | } |
| | | |
| | | public ContactStatusEnum getContactStatus() { |
| | | return contactStatus; |
| | | } |
| | | |
| | | public void setContactStatus(ContactStatusEnum contactStatus) { |
| | | this.contactStatus = contactStatus; |
| | | } |
| | | |
| | | public Instant getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Instant updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getSeniority() { |
| | | return seniority; |
| | | } |
| | | |
| | | public void setSeniority(String seniority) { |
| | | this.seniority = seniority; |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.service.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | |
| | | import java.time.Instant; |
| | | import java.util.List; |
| | | |
| | | public class ConsultantDetailDTO { |
| | | |
| | | private String name; |
| | | private String agentNo; |
| | | private String role; |
| | | private String image; |
| | | private Float avgScore; |
| | | private String title; |
| | | private String phoneNumber; |
| | | private String serveArea; |
| | | private String companyAddress; |
| | | private Instant latestLoginTime; |
| | | private String seniority; |
| | | private Number suitability; |
| | | private Number evaluation; |
| | | private List<String> expertises; |
| | | private String concept; |
| | | private List<String> experiences; |
| | | private String awards; |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getAgentNo() { |
| | | return agentNo; |
| | | } |
| | | |
| | | public void setAgentNo(String agentNo) { |
| | | this.agentNo = agentNo; |
| | | } |
| | | |
| | | public String getRole() { |
| | | return role; |
| | | } |
| | | |
| | | public void setRole(String role) { |
| | | this.role = role; |
| | | } |
| | | |
| | | public String getImage() { |
| | | return image; |
| | | } |
| | | |
| | | public void setImage(String image) { |
| | | this.image = image; |
| | | } |
| | | |
| | | public Float getAvgScore() { |
| | | return avgScore; |
| | | } |
| | | |
| | | public void setAvgScore(Float avgScore) { |
| | | this.avgScore = avgScore; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public String getPhoneNumber() { |
| | | return phoneNumber; |
| | | } |
| | | |
| | | public void setPhoneNumber(String phoneNumber) { |
| | | this.phoneNumber = phoneNumber; |
| | | } |
| | | |
| | | public String getServeArea() { |
| | | return serveArea; |
| | | } |
| | | |
| | | public void setServeArea(String serveArea) { |
| | | this.serveArea = serveArea; |
| | | } |
| | | |
| | | public String getCompanyAddress() { |
| | | return companyAddress; |
| | | } |
| | | |
| | | public void setCompanyAddress(String companyAddress) { |
| | | this.companyAddress = companyAddress; |
| | | } |
| | | |
| | | public Instant getLatestLoginTime() { |
| | | return latestLoginTime; |
| | | } |
| | | |
| | | public void setLatestLoginTime(Instant latestLoginTime) { |
| | | this.latestLoginTime = latestLoginTime; |
| | | } |
| | | |
| | | public String getSeniority() { |
| | | return seniority; |
| | | } |
| | | |
| | | public void setSeniority(String seniority) { |
| | | this.seniority = seniority; |
| | | } |
| | | |
| | | public Number getSuitability() { |
| | | return suitability; |
| | | } |
| | | |
| | | public void setSuitability(Number suitability) { |
| | | this.suitability = suitability; |
| | | } |
| | | |
| | | public Number getEvaluation() { |
| | | return evaluation; |
| | | } |
| | | |
| | | public void setEvaluation(Number evaluation) { |
| | | this.evaluation = evaluation; |
| | | } |
| | | |
| | | public List<String> getExpertises() { |
| | | return expertises; |
| | | } |
| | | |
| | | public void setExpertises(List<String> expertises) { |
| | | this.expertises = expertises; |
| | | } |
| | | |
| | | public String getConcept() { |
| | | return concept; |
| | | } |
| | | |
| | | public void setConcept(String concept) { |
| | | this.concept = concept; |
| | | } |
| | | |
| | | public List<String> getExperiences() { |
| | | return experiences; |
| | | } |
| | | |
| | | public void setExperiences(List<String> experiences) { |
| | | this.experiences = experiences; |
| | | } |
| | | |
| | | public String getAwards() { |
| | | return awards; |
| | | } |
| | | |
| | | public void setAwards(String awards) { |
| | | this.awards = awards; |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.service.dto; |
| | | |
| | | import com.pollex.pam.enums.GenderEnum; |
| | | |
| | | public class FastQueryConsultantParam { |
| | | private GenderEnum gender; |
| | | private String communicationStyle; |
| | | private Number avgScore; |
| | | private String status; |
| | | |
| | | public GenderEnum getGender() { |
| | | return gender; |
| | | } |
| | | |
| | | public void setGender(GenderEnum gender) { |
| | | this.gender = gender; |
| | | } |
| | | |
| | | public String getCommunicationStyle() { |
| | | return communicationStyle; |
| | | } |
| | | |
| | | public void setCommunicationStyle(String communicationStyle) { |
| | | this.communicationStyle = communicationStyle; |
| | | } |
| | | |
| | | public Number getAvgScore() { |
| | | return avgScore; |
| | | } |
| | | |
| | | public void setAvgScore(Number avgScore) { |
| | | this.avgScore = avgScore; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.service.dto; |
| | | |
| | | import com.pollex.pam.enums.GenderEnum; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class StrictQueryConsultantParam { |
| | | |
| | | private GenderEnum gender; |
| | | private Number avgScore; |
| | | private String status; |
| | | private String area; |
| | | private List<String> requirements; |
| | | private String otherRequirement; |
| | | private String seniority; |
| | | private List<String> popularTags; |
| | | private String otherPopularTags; |
| | | |
| | | public GenderEnum getGender() { |
| | | return gender; |
| | | } |
| | | |
| | | public void setGender(GenderEnum gender) { |
| | | this.gender = gender; |
| | | } |
| | | |
| | | public Number getAvgScore() { |
| | | return avgScore; |
| | | } |
| | | |
| | | public void setAvgScore(Number avgScore) { |
| | | this.avgScore = avgScore; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getArea() { |
| | | return area; |
| | | } |
| | | |
| | | public void setArea(String area) { |
| | | this.area = area; |
| | | } |
| | | |
| | | public List<String> getRequirements() { |
| | | return requirements; |
| | | } |
| | | |
| | | public void setRequirements(List<String> requirements) { |
| | | this.requirements = requirements; |
| | | } |
| | | |
| | | public String getOtherRequirement() { |
| | | return otherRequirement; |
| | | } |
| | | |
| | | public void setOtherRequirement(String otherRequirement) { |
| | | this.otherRequirement = otherRequirement; |
| | | } |
| | | |
| | | public String getSeniority() { |
| | | return seniority; |
| | | } |
| | | |
| | | public void setSeniority(String seniority) { |
| | | this.seniority = seniority; |
| | | } |
| | | |
| | | public List<String> getPopularTags() { |
| | | return popularTags; |
| | | } |
| | | |
| | | public void setPopularTags(List<String> popularTags) { |
| | | this.popularTags = popularTags; |
| | | } |
| | | |
| | | public String getOtherPopularTags() { |
| | | return otherPopularTags; |
| | | } |
| | | |
| | | public void setOtherPopularTags(String otherPopularTags) { |
| | | this.otherPopularTags = otherPopularTags; |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.service.mapper; |
| | | |
| | | import com.pollex.pam.domain.Consultant; |
| | | import com.pollex.pam.enums.ContactStatusEnum; |
| | | import com.pollex.pam.service.dto.ConsultantDTO; |
| | | import com.pollex.pam.service.dto.ConsultantDetailDTO; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.Instant; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | public class ConsultantMapper { |
| | | |
| | | private final static Character SPLIT_MASK = ','; |
| | | |
| | | public List<ConsultantDTO> toDto(List<Consultant> source) { |
| | | return source.stream().map(this::toDto).collect(Collectors.toList()); |
| | | } |
| | | |
| | | // todo convert |
| | | public ConsultantDTO toDto(Consultant source) { |
| | | ConsultantDTO consultantDTO = new ConsultantDTO(); |
| | | consultantDTO.setAgentNo(source.getAgentNo()); |
| | | consultantDTO.setName(source.getName()); |
| | | consultantDTO.setAvgScore(source.getAvgScore()); |
| | | consultantDTO.setSeniority(source.getSeniority()); |
| | | |
| | | // todo |
| | | consultantDTO.setImg(""); |
| | | consultantDTO.setExpertise(splitStringWithChar(source.getExpertise())); |
| | | consultantDTO.setNewConsultant(false); |
| | | consultantDTO.setContactStatus(ContactStatusEnum.CONTACTED); |
| | | consultantDTO.setUpdateTime(Instant.now()); |
| | | |
| | | return consultantDTO; |
| | | } |
| | | |
| | | public ConsultantDetailDTO toDetailDto(Consultant source) { |
| | | ConsultantDetailDTO consultantDetailDTO = new ConsultantDetailDTO(); |
| | | consultantDetailDTO.setName(source.getName()); |
| | | consultantDetailDTO.setAgentNo(source.getAgentNo()); |
| | | consultantDetailDTO.setRole(source.getRole()); |
| | | consultantDetailDTO.setAvgScore(source.getAvgScore()); |
| | | consultantDetailDTO.setTitle(source.getTitle()); |
| | | consultantDetailDTO.setPhoneNumber(source.getPhoneNumber()); |
| | | consultantDetailDTO.setServeArea(source.getServeArea()); |
| | | consultantDetailDTO.setCompanyAddress(source.getCompanyAddress()); |
| | | consultantDetailDTO.setLatestLoginTime(source.getLatestLoginTime()); |
| | | consultantDetailDTO.setSeniority(source.getSeniority()); |
| | | consultantDetailDTO.setConcept(source.getConcept()); |
| | | consultantDetailDTO.setAwards(source.getAward()); |
| | | |
| | | consultantDetailDTO.setImage(""); |
| | | consultantDetailDTO.setSuitability(0); |
| | | consultantDetailDTO.setEvaluation(0); |
| | | consultantDetailDTO.setExpertises(splitStringWithChar(source.getExpertise())); |
| | | consultantDetailDTO.setExperiences(splitStringWithChar(source.getExperience())); |
| | | |
| | | return consultantDetailDTO; |
| | | } |
| | | |
| | | private List<String> splitStringWithChar(String source) { |
| | | return Arrays.stream(StringUtils.split(source, SPLIT_MASK)) |
| | | .map(String::trim) |
| | | .collect(Collectors.toList()); |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.web.rest; |
| | | |
| | | import com.pollex.pam.service.ConsultantService; |
| | | import com.pollex.pam.service.dto.*; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/api/consultant") |
| | | public class ConsultantResource { |
| | | |
| | | private final ConsultantService consultantService; |
| | | |
| | | public ConsultantResource(ConsultantService consultantService) { |
| | | this.consultantService = consultantService; |
| | | } |
| | | |
| | | @GetMapping("") |
| | | public ResponseEntity<List<ConsultantDTO>> getMyConsultantList() { |
| | | List<ConsultantDTO> myConsultants = consultantService.getMyConsultantList(); |
| | | return new ResponseEntity<>(myConsultants, HttpStatus.OK); |
| | | } |
| | | |
| | | @GetMapping("/recommend") |
| | | public ResponseEntity<List<ConsultantDTO>> getRecommendConsultantList() { |
| | | List<ConsultantDTO> recommendConsultantList = consultantService.getRecommendConsultantList(); |
| | | return new ResponseEntity<>(recommendConsultantList, HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping("") |
| | | public ResponseEntity<Void> addConsultantToOwnList(@RequestBody AddConsultantParam param) { |
| | | consultantService.addConsultantToOwnList(param); |
| | | return new ResponseEntity<>(HttpStatus.ACCEPTED); |
| | | } |
| | | |
| | | @GetMapping("/strictQuery") |
| | | public ResponseEntity<List<ConsultantDTO>> strictQueryConsultant(@RequestBody StrictQueryConsultantParam param) { |
| | | List<ConsultantDTO> queryResult = consultantService.strictQueryConsultant(param); |
| | | return new ResponseEntity<>(queryResult, HttpStatus.OK); |
| | | } |
| | | |
| | | @GetMapping("/fastQuery") |
| | | public ResponseEntity<List<ConsultantDTO>> fastQueryConsultant(@RequestBody FastQueryConsultantParam param) { |
| | | List<ConsultantDTO> queryResult = consultantService.fastQueryConsultant(param); |
| | | return new ResponseEntity<>(queryResult, HttpStatus.OK); |
| | | } |
| | | |
| | | @GetMapping("/{agentNo}") |
| | | public ResponseEntity<ConsultantDetailDTO> getConsultantDetail(@PathVariable String agentNo) { |
| | | ConsultantDetailDTO result = consultantService.getConsultantDetail(agentNo); |
| | | return new ResponseEntity<>(result, HttpStatus.OK); |
| | | } |
| | | } |
¤ñ¹ï·sÀÉ®× |
| | |
| | | package com.pollex.pam.web.rest.errors; |
| | | |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.web.bind.annotation.ResponseStatus; |
| | | |
| | | @ResponseStatus(code = HttpStatus.NOT_FOUND, reason = "Consultant not found") |
| | | public class ConsultantNotFoundException extends RuntimeException{ |
| | | } |