| Line 194... |
Line 194... |
| 194 |
@RequestMapping(value = ProfitMandiConstants.URL_MOBILE_OPERATORS, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
194 |
@RequestMapping(value = ProfitMandiConstants.URL_MOBILE_OPERATORS, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 195 |
@ApiImplicitParams({
|
195 |
@ApiImplicitParams({
|
| 196 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
196 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| 197 |
|
197 |
|
| 198 |
@ApiOperation(value = "")
|
198 |
@ApiOperation(value = "")
|
| 199 |
@Transactional(readOnly = true)
|
- |
|
| 200 |
public ResponseEntity<?> getAllMobileOperators(HttpServletRequest request,
|
199 |
public ResponseEntity<?> getAllMobileOperators(HttpServletRequest request,
|
| 201 |
@RequestParam(name = ProfitMandiConstants.OPERATOR_TYPE) OperatorType operatorType) {
|
200 |
@RequestParam(name = ProfitMandiConstants.OPERATOR_TYPE) OperatorType operatorType) {
|
| 202 |
Map<Integer, String> mobileProviderMap = new HashMap<>();
|
201 |
Map<Integer, String> mobileProviderMap = new HashMap<>();
|
| 203 |
List<RechargeOperator> rechargeOperators = rechargeOperatorRepository.selectAllByOperatorType(operatorType);
|
202 |
List<RechargeOperator> rechargeOperators = rechargeOperatorRepository.selectAllByOperatorType(operatorType);
|
| 204 |
// List<RechargeOperator> rechargeOperators =
|
203 |
// List<RechargeOperator> rechargeOperators =
|
| Line 376... |
Line 375... |
| 376 |
}
|
375 |
}
|
| 377 |
|
376 |
|
| 378 |
@RequestMapping(value = ProfitMandiConstants.URL_RECHARGE_SUMMARY, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
377 |
@RequestMapping(value = ProfitMandiConstants.URL_RECHARGE_SUMMARY, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 379 |
@ApiImplicitParams({
|
378 |
@ApiImplicitParams({
|
| 380 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
379 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| 381 |
@Transactional(readOnly = true)
|
- |
|
| 382 |
public ResponseEntity<?> rechargeSummary(HttpServletRequest request,
|
380 |
public ResponseEntity<?> rechargeSummary(HttpServletRequest request,
|
| 383 |
@RequestParam(name = "offset", defaultValue = "0") int offset,
|
381 |
@RequestParam(name = "offset", defaultValue = "0") int offset,
|
| 384 |
@RequestParam(name = "limit", defaultValue = "10") int limit) throws ProfitMandiBusinessException {
|
382 |
@RequestParam(name = "limit", defaultValue = "10") int limit) throws ProfitMandiBusinessException {
|
| 385 |
int userId = (int) request.getAttribute(ProfitMandiConstants.USER_ID);
|
383 |
int userId = (int) request.getAttribute(ProfitMandiConstants.USER_ID);
|
| 386 |
int retailerId = userAccountRepository.selectRetailerIdByUserId(userId);
|
384 |
int retailerId = userAccountRepository.selectRetailerIdByUserId(userId);
|
| Line 397... |
Line 395... |
| 397 |
}
|
395 |
}
|
| 398 |
|
396 |
|
| 399 |
@RequestMapping(value = ProfitMandiConstants.URL_RECHARGE_COMMISSIONS, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
397 |
@RequestMapping(value = ProfitMandiConstants.URL_RECHARGE_COMMISSIONS, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 400 |
@ApiImplicitParams({
|
398 |
@ApiImplicitParams({
|
| 401 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
399 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| 402 |
@Transactional(readOnly = true)
|
- |
|
| 403 |
public ResponseEntity<?> rechargeCommissions(HttpServletRequest request,
|
400 |
public ResponseEntity<?> rechargeCommissions(HttpServletRequest request,
|
| 404 |
@RequestParam(name = "offset", defaultValue = "0") int offset,
|
401 |
@RequestParam(name = "offset", defaultValue = "0") int offset,
|
| 405 |
@RequestParam(name = "limit", defaultValue = "60") int limit) throws ProfitMandiBusinessException {
|
402 |
@RequestParam(name = "limit", defaultValue = "60") int limit) throws ProfitMandiBusinessException {
|
| 406 |
List<RechargeCommission> rechargeCommissions = rechargeCommissionRepository.selectAllPaginated(offset, limit);
|
403 |
List<RechargeCommission> rechargeCommissions = rechargeCommissionRepository.selectAllPaginated(offset, limit);
|
| 407 |
for (RechargeCommission rechargeCommission : rechargeCommissions) {
|
404 |
for (RechargeCommission rechargeCommission : rechargeCommissions) {
|
| Line 488... |
Line 485... |
| 488 |
}
|
485 |
}
|
| 489 |
|
486 |
|
| 490 |
@RequestMapping(value = ProfitMandiConstants.URL_MY_RECHARGES, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
487 |
@RequestMapping(value = ProfitMandiConstants.URL_MY_RECHARGES, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
|
| 491 |
@ApiImplicitParams({
|
488 |
@ApiImplicitParams({
|
| 492 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
489 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
| 493 |
@Transactional(readOnly = true)
|
- |
|
| 494 |
public ResponseEntity<?> myRecharges(HttpServletRequest request, @RequestParam(value = "offset") int offset,
|
490 |
public ResponseEntity<?> myRecharges(HttpServletRequest request, @RequestParam(value = "offset") int offset,
|
| 495 |
@RequestParam(value = "limit") int limit) throws ProfitMandiBusinessException {
|
491 |
@RequestParam(value = "limit") int limit) throws ProfitMandiBusinessException {
|
| 496 |
TransactionClient tc = null;
|
492 |
TransactionClient tc = null;
|
| 497 |
int userId = (int) request.getAttribute("userId");
|
493 |
int userId = (int) request.getAttribute("userId");
|
| 498 |
UserAccount userAccount;
|
494 |
UserAccount userAccount;
|