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