Commit 07502cddff1f9c8b65fc47c823ba44a0c21b45aa
1 parent
d530946b
Exists in
master
and in
1 other branch
update mockup true
Showing
2 changed files
with
289 additions
and
239 deletions
Show diff stats
app.js
| ... | ... | @@ -398,6 +398,7 @@ app.post('/goapi/profile/assetDetail', require('./ccbs').assetDetail); |
| 398 | 398 | app.post('/goapi/profile/churnscore/offerlist', require('./ccbs').churnScoreOfferList); |
| 399 | 399 | app.get('/goapi/profile/external/customer/usageInfo/:type/:number', require('./ccbs').usageInfo); |
| 400 | 400 | app.post('/v1/OSBCOM/BillingProfileInfo/UsageProfileInfoREST/getAccumulationUOMGroupList/', require('./ccbs').accumulationUOMGroupList); |
| 401 | +app.post('/CCBSCommonInfo/MGCommonInfo/getPrimaryKeyListWithoutResourceType', require('./ccbs').getPrimaryKeyListWithoutResourceType); | |
| 401 | 402 | |
| 402 | 403 | app.get('/api/callback', require('./line').callback); |
| 403 | 404 | ... | ... |
ccbs.js
| 1 | 1 | module.exports.assetDetail = async (req, res) => { |
| 2 | - console.log('===== POST assetDetail =====') | |
| 3 | - console.log('url', req.originalUrl); | |
| 4 | - console.log('headers', req.headers); | |
| 5 | - console.log('query', req.query); | |
| 6 | - console.log('params', req.params); | |
| 7 | - console.log('body', req.body); | |
| 2 | + console.log('===== POST assetDetail =====') | |
| 3 | + console.log('url', req.originalUrl); | |
| 4 | + console.log('headers', req.headers); | |
| 5 | + console.log('query', req.query); | |
| 6 | + console.log('params', req.params); | |
| 7 | + console.log('body', req.body); | |
| 8 | 8 | |
| 9 | - let responseErr = { | |
| 10 | - "code" : "5000", | |
| 11 | - "msg" : "Error bind json to model" | |
| 12 | - } | |
| 9 | + let responseErr = { | |
| 10 | + "code": "5000", | |
| 11 | + "msg": "Error bind json to model" | |
| 12 | + } | |
| 13 | 13 | |
| 14 | - let response = { | |
| 15 | - "code" : "500", | |
| 16 | - "msg" : "success.", | |
| 17 | - "outstandingBalance": 0, | |
| 18 | - "currentBillBalance": 1.61, | |
| 19 | - "dueDate": "21/11/2020", | |
| 20 | - "subStatus": { | |
| 21 | - "FullSusMsg": "No", | |
| 22 | - "status": "Active", | |
| 23 | - "detail": [{ | |
| 24 | - "reason": "(SYSREQ)System Request", | |
| 25 | - "since": "05/10/2018 17:54:36" | |
| 26 | - } | |
| 27 | - ] | |
| 28 | - }, | |
| 29 | - "assetRowId": "1-2CN6IWH0", | |
| 30 | - "serviceId": "0952543411", | |
| 31 | - "productLine": "True Mobile", | |
| 32 | - "startDate": "16/07/2015", | |
| 33 | - "assetLifetime": "5 years, 4 months, 9 days", | |
| 34 | - "preferredLanguage": "Thai", | |
| 35 | - "productType": "Postpay", | |
| 36 | - "currentBillCycle": "28/27", | |
| 37 | - "lastPPEffectiveDate": "28/10/2019", | |
| 38 | - "lastFullSuspension": "No", | |
| 39 | - "credit": { | |
| 40 | - "limit": 2500, | |
| 41 | - "available": 2459.5, | |
| 42 | - "defaultCredit": "1000", | |
| 43 | - "temporary": "0", | |
| 44 | - "permanent": "2500", | |
| 45 | - "expiryDate": "", | |
| 46 | - "status": "Permanent", | |
| 47 | - "totalObligation": 40.5 | |
| 48 | - }, | |
| 49 | - "discount": { | |
| 50 | - "discountList": [{ | |
| 51 | - "name": "CVG012", | |
| 52 | - "description": "True Smart Choice Discount 499", | |
| 53 | - "startDate": "05/10/2018", | |
| 54 | - "endDate": "06/10/2018" | |
| 55 | - } | |
| 56 | - ], | |
| 57 | - "discountIndicator": "Yes" | |
| 58 | - }, | |
| 59 | - "contract": { | |
| 60 | - "contractIndicator": "No", | |
| 61 | - "list": [{ | |
| 62 | - "propositionCode": "CVG000000000052", | |
| 63 | - "propositionDescription": "TrueSmartChoice Regu 4G No Limit", | |
| 64 | - "term": "12", | |
| 65 | - "fee": 0, | |
| 66 | - "startDate": "04/10/2019", | |
| 67 | - "expireDate": "05/10/2019", | |
| 68 | - "contractIndicator": "No", | |
| 69 | - "offerCode": "12534317", | |
| 70 | - "contractNumber": "-", | |
| 71 | - "offerInstanceId": "162918628", | |
| 72 | - "terminationDate": "" | |
| 73 | - },{ | |
| 74 | - "propositionCode": "CVG000000000052", | |
| 75 | - "propositionDescription": "TrueSmartChoice Regu 4G No Limit", | |
| 76 | - "term": "12", | |
| 77 | - "fee": 0, | |
| 78 | - "startDate": "04/10/2019", | |
| 79 | - "expireDate": "05/10/2019", | |
| 80 | - "contractIndicator": "No", | |
| 81 | - "offerCode": "12534317", | |
| 82 | - "contractNumber": "-", | |
| 83 | - "offerInstanceId": "162918628", | |
| 84 | - "terminationDate": "" | |
| 85 | - } | |
| 86 | - ] | |
| 87 | - }, | |
| 88 | - "installAddress": {} | |
| 89 | - } | |
| 14 | + let response = { | |
| 15 | + "code": "500", | |
| 16 | + "msg": "success.", | |
| 17 | + "outstandingBalance": 0, | |
| 18 | + "currentBillBalance": 1.61, | |
| 19 | + "dueDate": "21/11/2020", | |
| 20 | + "subStatus": { | |
| 21 | + "FullSusMsg": "No", | |
| 22 | + "status": "Active", | |
| 23 | + "detail": [{ | |
| 24 | + "reason": "(SYSREQ)System Request", | |
| 25 | + "since": "05/10/2018 17:54:36" | |
| 26 | + } | |
| 27 | + ] | |
| 28 | + }, | |
| 29 | + "assetRowId": "1-2CN6IWH0", | |
| 30 | + "serviceId": "0952543411", | |
| 31 | + "productLine": "True Mobile", | |
| 32 | + "startDate": "16/07/2015", | |
| 33 | + "assetLifetime": "5 years, 4 months, 9 days", | |
| 34 | + "preferredLanguage": "Thai", | |
| 35 | + "productType": "Postpay", | |
| 36 | + "currentBillCycle": "28/27", | |
| 37 | + "lastPPEffectiveDate": "28/10/2019", | |
| 38 | + "lastFullSuspension": "No", | |
| 39 | + "credit": { | |
| 40 | + "limit": 2500, | |
| 41 | + "available": 2459.5, | |
| 42 | + "defaultCredit": "1000", | |
| 43 | + "temporary": "0", | |
| 44 | + "permanent": "2500", | |
| 45 | + "expiryDate": "", | |
| 46 | + "status": "Permanent", | |
| 47 | + "totalObligation": 40.5 | |
| 48 | + }, | |
| 49 | + "discount": { | |
| 50 | + "discountList": [{ | |
| 51 | + "name": "CVG012", | |
| 52 | + "description": "True Smart Choice Discount 499", | |
| 53 | + "startDate": "05/10/2018", | |
| 54 | + "endDate": "06/10/2018" | |
| 55 | + } | |
| 56 | + ], | |
| 57 | + "discountIndicator": "Yes" | |
| 58 | + }, | |
| 59 | + "contract": { | |
| 60 | + "contractIndicator": "No", | |
| 61 | + "list": [{ | |
| 62 | + "propositionCode": "CVG000000000052", | |
| 63 | + "propositionDescription": "TrueSmartChoice Regu 4G No Limit", | |
| 64 | + "term": "12", | |
| 65 | + "fee": 0, | |
| 66 | + "startDate": "04/10/2019", | |
| 67 | + "expireDate": "05/10/2019", | |
| 68 | + "contractIndicator": "No", | |
| 69 | + "offerCode": "12534317", | |
| 70 | + "contractNumber": "-", | |
| 71 | + "offerInstanceId": "162918628", | |
| 72 | + "terminationDate": "" | |
| 73 | + }, { | |
| 74 | + "propositionCode": "CVG000000000052", | |
| 75 | + "propositionDescription": "TrueSmartChoice Regu 4G No Limit", | |
| 76 | + "term": "12", | |
| 77 | + "fee": 0, | |
| 78 | + "startDate": "04/10/2019", | |
| 79 | + "expireDate": "05/10/2019", | |
| 80 | + "contractIndicator": "No", | |
| 81 | + "offerCode": "12534317", | |
| 82 | + "contractNumber": "-", | |
| 83 | + "offerInstanceId": "162918628", | |
| 84 | + "terminationDate": "" | |
| 85 | + } | |
| 86 | + ] | |
| 87 | + }, | |
| 88 | + "installAddress": {} | |
| 89 | + } | |
| 90 | 90 | |
| 91 | - res.status(200).send(response) | |
| 91 | + res.status(200).send(response) | |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | module.exports.churnScoreOfferList = async (req, res) => { |
| 95 | - console.log('===== POST churnScoreOfferList =====') | |
| 96 | - console.log('url', req.originalUrl); | |
| 97 | - console.log('headers', req.headers); | |
| 98 | - console.log('query', req.query); | |
| 99 | - console.log('params', req.params); | |
| 100 | - console.log('body', req.body); | |
| 95 | + console.log('===== POST churnScoreOfferList =====') | |
| 96 | + console.log('url', req.originalUrl); | |
| 97 | + console.log('headers', req.headers); | |
| 98 | + console.log('query', req.query); | |
| 99 | + console.log('params', req.params); | |
| 100 | + console.log('body', req.body); | |
| 101 | 101 | |
| 102 | - let responseErr = { | |
| 103 | - "code" : "404", | |
| 104 | - "message" : "Not found" | |
| 105 | - } | |
| 102 | + let responseErr = { | |
| 103 | + "code": "404", | |
| 104 | + "message": "Not found" | |
| 105 | + } | |
| 106 | 106 | |
| 107 | - let response = { | |
| 108 | - "campTransID": "5c0a746b-ae69-447d-84b0-b0bdaa4b6add", | |
| 109 | - "campID": "0007", | |
| 110 | - "campCode": "PRPTOL000001", | |
| 111 | - "campName": "PRP TOL CAMPAIGN", | |
| 112 | - "callScript": "", | |
| 113 | - "offerList": [ | |
| 114 | - { | |
| 115 | - "productName": "True Online", | |
| 116 | - "offerCode": "VASUP121MOCJA01", | |
| 117 | - "offerName": "1000/500Mbps.", | |
| 118 | - "offerType": "VAS", | |
| 119 | - "offerTypeText": "VAS", | |
| 120 | - "offerDescTH": "VASUP121MOCJA01 : 1000/500Mbps.", | |
| 121 | - "offerDescEN": "VASUP121MOCJA01 : 1000/500Mbps.", | |
| 122 | - "serviceType": "85", | |
| 123 | - "autoAssign": "N", | |
| 124 | - "appointmentFlag": true | |
| 125 | - } | |
| 126 | - ] | |
| 127 | - } | |
| 107 | + let response = { | |
| 108 | + "campTransID": "5c0a746b-ae69-447d-84b0-b0bdaa4b6add", | |
| 109 | + "campID": "0007", | |
| 110 | + "campCode": "PRPTOL000001", | |
| 111 | + "campName": "PRP TOL CAMPAIGN", | |
| 112 | + "callScript": "", | |
| 113 | + "offerList": [ | |
| 114 | + { | |
| 115 | + "productName": "True Online", | |
| 116 | + "offerCode": "VASUP121MOCJA01", | |
| 117 | + "offerName": "1000/500Mbps.", | |
| 118 | + "offerType": "VAS", | |
| 119 | + "offerTypeText": "VAS", | |
| 120 | + "offerDescTH": "VASUP121MOCJA01 : 1000/500Mbps.", | |
| 121 | + "offerDescEN": "VASUP121MOCJA01 : 1000/500Mbps.", | |
| 122 | + "serviceType": "85", | |
| 123 | + "autoAssign": "N", | |
| 124 | + "appointmentFlag": true | |
| 125 | + } | |
| 126 | + ] | |
| 127 | + } | |
| 128 | 128 | |
| 129 | - res.status(200).send(response) | |
| 129 | + res.status(200).send(response) | |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | module.exports.usageInfo = async (req, res) => { |
| 133 | - console.log('===== GET usageInfo =====') | |
| 134 | - console.log('url', req.originalUrl); | |
| 135 | - console.log('headers', req.headers); | |
| 136 | - console.log('query', req.query); | |
| 137 | - console.log('params', req.params); | |
| 138 | - console.log('body', req.body); | |
| 133 | + console.log('===== GET usageInfo =====') | |
| 134 | + console.log('url', req.originalUrl); | |
| 135 | + console.log('headers', req.headers); | |
| 136 | + console.log('query', req.query); | |
| 137 | + console.log('params', req.params); | |
| 138 | + console.log('body', req.body); | |
| 139 | 139 | |
| 140 | - let responseErr = { | |
| 141 | - "code" : "404", | |
| 142 | - "message" : "Not found" | |
| 143 | - } | |
| 140 | + let responseErr = { | |
| 141 | + "code": "404", | |
| 142 | + "message": "Not found" | |
| 143 | + } | |
| 144 | 144 | |
| 145 | - let response = { | |
| 146 | - "trueId": { | |
| 147 | - "device": "WEB", | |
| 148 | - "lastAccess": "27/12/2018 04:51:12" | |
| 149 | - }, | |
| 150 | - "trueYou": { | |
| 151 | - "device": "WEB", | |
| 152 | - "lastAccess": "27/12/2018 04:25:42" | |
| 153 | - }, | |
| 154 | - "iService": { | |
| 155 | - "device": "IOS", | |
| 156 | - "lastAccess": "27/12/2018 04:31:22" | |
| 157 | - }, | |
| 158 | - "trueWallet": { | |
| 159 | - "device": "123", | |
| 160 | - "lastAccess": "123" | |
| 161 | - }, | |
| 162 | - "tdgError": false, | |
| 163 | - "TrueMoneyError": true | |
| 164 | - } | |
| 145 | + let response = { | |
| 146 | + "trueId": { | |
| 147 | + "device": "WEB", | |
| 148 | + "lastAccess": "27/12/2018 04:51:12" | |
| 149 | + }, | |
| 150 | + "trueYou": { | |
| 151 | + "device": "WEB", | |
| 152 | + "lastAccess": "27/12/2018 04:25:42" | |
| 153 | + }, | |
| 154 | + "iService": { | |
| 155 | + "device": "IOS", | |
| 156 | + "lastAccess": "27/12/2018 04:31:22" | |
| 157 | + }, | |
| 158 | + "trueWallet": { | |
| 159 | + "device": "123", | |
| 160 | + "lastAccess": "123" | |
| 161 | + }, | |
| 162 | + "tdgError": false, | |
| 163 | + "TrueMoneyError": true | |
| 164 | + } | |
| 165 | 165 | |
| 166 | - res.status(200).send(response) | |
| 166 | + res.status(200).send(response) | |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | module.exports.accumulationUOMGroupList = async (req, res) => { |
| 170 | - console.log('===== POST accumulationUOMGroupList =====') | |
| 171 | - console.log('url', req.originalUrl); | |
| 172 | - console.log('headers', req.headers); | |
| 173 | - console.log('query', req.query); | |
| 174 | - console.log('params', req.params); | |
| 175 | - console.log('body', req.body); | |
| 170 | + console.log('===== POST accumulationUOMGroupList =====') | |
| 171 | + console.log('url', req.originalUrl); | |
| 172 | + console.log('headers', req.headers); | |
| 173 | + console.log('query', req.query); | |
| 174 | + console.log('params', req.params); | |
| 175 | + console.log('body', req.body); | |
| 176 | 176 | |
| 177 | - console.log(JSON.stringify(req.body)) | |
| 177 | + console.log(JSON.stringify(req.body)) | |
| 178 | 178 | |
| 179 | - let responseErr = { | |
| 180 | - "errorCode" : "OSBbllngA00002", | |
| 181 | - "message" : "Error.", | |
| 182 | - } | |
| 179 | + let responseErr = { | |
| 180 | + "errorCode": "OSBbllngA00002", | |
| 181 | + "message": "Error.", | |
| 182 | + } | |
| 183 | 183 | |
| 184 | - let response = { | |
| 185 | - "errorCode" : "OSBbllngA00001", | |
| 186 | - "message" : "Success.", | |
| 187 | - "uuid" : "ca517eac-b687-45f2-a921-c5138c44402e", | |
| 188 | - "backendResponseList" : { | |
| 189 | - "backendResponseInfoArray" : [ { | |
| 190 | - "apiName" : "getPrimaryKeyInfoByActiveAndBusinessLine", | |
| 191 | - "errorCode" : "OSBbllngA00001", | |
| 192 | - "message" : "Success.", | |
| 193 | - "system" : "OSB", | |
| 194 | - "url" : "http://172.19.188.21:8080/ESB_Get_CustomerPreferenceInfo/Interfaces/Proxy/CommonPreferenceInfoPS" | |
| 195 | - }, { | |
| 196 | - "apiName" : "getUnbilledCycleInfo", | |
| 197 | - "errorCode" : "OSBbllngA00001", | |
| 198 | - "message" : "Success.", | |
| 199 | - "system" : "OSB", | |
| 200 | - "url" : "http://172.19.188.21:8080/ESB_Get_FinancialManagementInfo/Interfaces/Proxy/BillingInfoPS" | |
| 201 | - }, { | |
| 202 | - "apiName" : "getRatedPerformanceIndicators3", | |
| 203 | - "errorCode" : "OSBbllngA00001", | |
| 204 | - "message" : "Success.", | |
| 205 | - "system" : "CCCSOA", | |
| 206 | - "url" : "http://172.19.136.104/RaterServiceWS/RaterServiceSI" | |
| 207 | - } ] | |
| 208 | - }, | |
| 209 | - "accumulationUOMGroupList" : { | |
| 210 | - "accumulationInfoArray" : [ { | |
| 211 | - "accumulatedCharge" : 135, | |
| 212 | - "accumulatedQuantity" : 191, | |
| 213 | - "accumulatedQuantityFormat" : "03:11:00", | |
| 214 | - "lastCallDate" : "2021-03-21T22:44:19.000+07:00", | |
| 215 | - "serviceType" : "Voice", | |
| 216 | - "system" : "CCBS", | |
| 217 | - "uomCode" : "M" | |
| 218 | - }, { | |
| 219 | - "accumulatedCharge" : 1013.5, | |
| 220 | - "accumulatedQuantity" : 223, | |
| 221 | - "accumulatedQuantityFormat" : null, | |
| 222 | - "lastCallDate" : "2021-03-22T08:06:29.000+07:00", | |
| 223 | - "serviceType" : "SMS", | |
| 224 | - "system" : "CCBS", | |
| 225 | - "uomCode" : "O" | |
| 226 | - }, { | |
| 227 | - "accumulatedCharge" : 546.4, | |
| 228 | - "accumulatedQuantity" : 223, | |
| 229 | - "accumulatedQuantityFormat" : null, | |
| 230 | - "lastCallDate" : "2021-03-22T08:06:29.000+07:00", | |
| 231 | - "serviceType" : "Video", | |
| 232 | - "system" : "CCBS", | |
| 233 | - "uomCode" : "O" | |
| 234 | - }, { | |
| 235 | - "accumulatedCharge" : 785.8, | |
| 236 | - "accumulatedQuantity" : 223, | |
| 237 | - "accumulatedQuantityFormat" : null, | |
| 238 | - "lastCallDate" : "2021-03-22T08:06:29.000+07:00", | |
| 239 | - "serviceType" : "Voice", | |
| 240 | - "system" : "CCBS", | |
| 241 | - "uomCode" : "O" | |
| 242 | - }, { | |
| 243 | - "accumulatedCharge" : 1251.9, | |
| 244 | - "accumulatedQuantity" : 258, | |
| 245 | - "accumulatedQuantityFormat" : null, | |
| 246 | - "lastCallDate" : "2021-03-22T08:06:29.000+07:00", | |
| 247 | - "serviceType" : "Video", | |
| 248 | - "system" : "CCBS", | |
| 249 | - "uomCode" : "M" | |
| 250 | - } ], | |
| 251 | - "size" : 2 | |
| 252 | - }, | |
| 253 | - "cycleInfo" : { | |
| 254 | - "code" : 13, | |
| 255 | - "month" : 4, | |
| 256 | - "year" : 2021 | |
| 257 | - }, | |
| 258 | - "maxLastCallDate" : "2021-03-22T08:06:29.000+07:00", | |
| 259 | - "rerateIndicator" : "N" | |
| 260 | - } | |
| 184 | + let response = { | |
| 185 | + "errorCode": "OSBbllngA00001", | |
| 186 | + "message": "Success.", | |
| 187 | + "uuid": "ca517eac-b687-45f2-a921-c5138c44402e", | |
| 188 | + "backendResponseList": { | |
| 189 | + "backendResponseInfoArray": [{ | |
| 190 | + "apiName": "getPrimaryKeyInfoByActiveAndBusinessLine", | |
| 191 | + "errorCode": "OSBbllngA00001", | |
| 192 | + "message": "Success.", | |
| 193 | + "system": "OSB", | |
| 194 | + "url": "http://172.19.188.21:8080/ESB_Get_CustomerPreferenceInfo/Interfaces/Proxy/CommonPreferenceInfoPS" | |
| 195 | + }, { | |
| 196 | + "apiName": "getUnbilledCycleInfo", | |
| 197 | + "errorCode": "OSBbllngA00001", | |
| 198 | + "message": "Success.", | |
| 199 | + "system": "OSB", | |
| 200 | + "url": "http://172.19.188.21:8080/ESB_Get_FinancialManagementInfo/Interfaces/Proxy/BillingInfoPS" | |
| 201 | + }, { | |
| 202 | + "apiName": "getRatedPerformanceIndicators3", | |
| 203 | + "errorCode": "OSBbllngA00001", | |
| 204 | + "message": "Success.", | |
| 205 | + "system": "CCCSOA", | |
| 206 | + "url": "http://172.19.136.104/RaterServiceWS/RaterServiceSI" | |
| 207 | + }] | |
| 208 | + }, | |
| 209 | + "accumulationUOMGroupList": { | |
| 210 | + "accumulationInfoArray": [{ | |
| 211 | + "accumulatedCharge": 135, | |
| 212 | + "accumulatedQuantity": 191, | |
| 213 | + "accumulatedQuantityFormat": "03:11:00", | |
| 214 | + "lastCallDate": "2021-03-21T22:44:19.000+07:00", | |
| 215 | + "serviceType": "Voice", | |
| 216 | + "system": "CCBS", | |
| 217 | + "uomCode": "M" | |
| 218 | + }, { | |
| 219 | + "accumulatedCharge": 1013.5, | |
| 220 | + "accumulatedQuantity": 223, | |
| 221 | + "accumulatedQuantityFormat": null, | |
| 222 | + "lastCallDate": "2021-03-22T08:06:29.000+07:00", | |
| 223 | + "serviceType": "SMS", | |
| 224 | + "system": "CCBS", | |
| 225 | + "uomCode": "O" | |
| 226 | + }, { | |
| 227 | + "accumulatedCharge": 546.4, | |
| 228 | + "accumulatedQuantity": 223, | |
| 229 | + "accumulatedQuantityFormat": null, | |
| 230 | + "lastCallDate": "2021-03-22T08:06:29.000+07:00", | |
| 231 | + "serviceType": "Video", | |
| 232 | + "system": "CCBS", | |
| 233 | + "uomCode": "O" | |
| 234 | + }, { | |
| 235 | + "accumulatedCharge": 785.8, | |
| 236 | + "accumulatedQuantity": 223, | |
| 237 | + "accumulatedQuantityFormat": null, | |
| 238 | + "lastCallDate": "2021-03-22T08:06:29.000+07:00", | |
| 239 | + "serviceType": "Voice", | |
| 240 | + "system": "CCBS", | |
| 241 | + "uomCode": "O" | |
| 242 | + }, { | |
| 243 | + "accumulatedCharge": 1251.9, | |
| 244 | + "accumulatedQuantity": 258, | |
| 245 | + "accumulatedQuantityFormat": null, | |
| 246 | + "lastCallDate": "2021-03-22T08:06:29.000+07:00", | |
| 247 | + "serviceType": "Video", | |
| 248 | + "system": "CCBS", | |
| 249 | + "uomCode": "M" | |
| 250 | + }], | |
| 251 | + "size": 2 | |
| 252 | + }, | |
| 253 | + "cycleInfo": { | |
| 254 | + "code": 13, | |
| 255 | + "month": 4, | |
| 256 | + "year": 2021 | |
| 257 | + }, | |
| 258 | + "maxLastCallDate": "2021-03-22T08:06:29.000+07:00", | |
| 259 | + "rerateIndicator": "N" | |
| 260 | + } | |
| 261 | 261 | |
| 262 | - res.status(200).send(responseErr) | |
| 262 | + res.status(200).send(responseErr) | |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | +module.exports.getPrimaryKeyListWithoutResourceType = async (req, res) => { | |
| 266 | + console.log('===== POST getPrimaryKeyListWithoutResourceType =====') | |
| 267 | + console.log('url', req.originalUrl); | |
| 268 | + console.log('headers', req.headers); | |
| 269 | + console.log('query', req.query); | |
| 270 | + console.log('params', req.params); | |
| 271 | + console.log('body', req.body); | |
| 272 | + | |
| 273 | + let responseErr ={ | |
| 274 | + "getPrimaryKeyListWithoutResourceTypeResponse": { | |
| 275 | + "return": { | |
| 276 | + "uuid": "f9336125-be9e-4c37-80c4-ab97990100cf", | |
| 277 | + "errorCode": "OSBbllngA10001", | |
| 278 | + "message": "Error" | |
| 279 | + } | |
| 280 | + } | |
| 281 | + } | |
| 265 | 282 | |
| 283 | + let response = { | |
| 284 | + "getPrimaryKeyListWithoutResourceTypeResponse": { | |
| 285 | + "return": { | |
| 286 | + "uuid": "f9336125-be9e-4c37-80c4-ab97990100cf", | |
| 287 | + "errorCode": "OSBbllngA00001", | |
| 288 | + "message": "Success.", | |
| 289 | + "primaryKeyList": { | |
| 290 | + "primaryKeyInfoArray": [ | |
| 291 | + { | |
| 292 | + "accountId": "200093866", | |
| 293 | + "accountSubType": "RVT", | |
| 294 | + "agreementIdOfOU": "1392732", | |
| 295 | + "agreementIdOfRootOU": "", | |
| 296 | + "customerId": "213656", | |
| 297 | + "customerType": "I", | |
| 298 | + "ouId": "133066", | |
| 299 | + "primaryResourceType": "C", | |
| 300 | + "primaryResourceValue": "0968730341", | |
| 301 | + "productId": "1392733", | |
| 302 | + "productStatus": "A", | |
| 303 | + "rootOUId": "123", | |
| 304 | + "system": "CCBS" | |
| 305 | + } | |
| 306 | + ], | |
| 307 | + "size": "1" | |
| 308 | + } | |
| 309 | + } | |
| 310 | + } | |
| 311 | + } | |
| 312 | + | |
| 313 | + res.status(200).send(response) | |
| 314 | +} | ... | ... |