| Line 11... |
Line 11... |
| 11 |
|
11 |
|
| 12 |
import org.slf4j.Logger;
|
12 |
import org.slf4j.Logger;
|
| 13 |
import org.slf4j.LoggerFactory;
|
13 |
import org.slf4j.LoggerFactory;
|
| 14 |
import org.springframework.beans.factory.annotation.Autowired;
|
14 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 15 |
import org.springframework.beans.factory.annotation.Value;
|
15 |
import org.springframework.beans.factory.annotation.Value;
|
| 16 |
import org.springframework.http.HttpHeaders;
|
- |
|
| 17 |
import org.springframework.http.HttpStatus;
|
16 |
import org.springframework.http.HttpStatus;
|
| 18 |
import org.springframework.http.MediaType;
|
- |
|
| 19 |
import org.springframework.http.ResponseEntity;
|
17 |
import org.springframework.http.ResponseEntity;
|
| 20 |
import org.springframework.stereotype.Controller;
|
18 |
import org.springframework.stereotype.Controller;
|
| 21 |
import org.springframework.transaction.annotation.Transactional;
|
19 |
import org.springframework.transaction.annotation.Transactional;
|
| 22 |
import org.springframework.web.bind.annotation.RequestBody;
|
20 |
import org.springframework.web.bind.annotation.RequestBody;
|
| 23 |
import org.springframework.web.bind.annotation.RequestMapping;
|
21 |
import org.springframework.web.bind.annotation.RequestMapping;
|
| Line 50... |
Line 48... |
| 50 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
48 |
import com.spice.profitmandi.dao.repository.dtr.RetailerRepository;
|
| 51 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
49 |
import com.spice.profitmandi.dao.repository.dtr.UserAccountRepository;
|
| 52 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
50 |
import com.spice.profitmandi.dao.repository.dtr.UserRepository;
|
| 53 |
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
|
51 |
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
|
| 54 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
52 |
import com.spice.profitmandi.dao.repository.user.AddressRepository;
|
| 55 |
import com.spice.profitmandi.dao.util.MigrationUtil;
|
- |
|
| 56 |
import com.spice.profitmandi.service.UserService;
|
53 |
import com.spice.profitmandi.service.UserService;
|
| 57 |
import com.spice.profitmandi.web.enumuration.UserStatus;
|
54 |
import com.spice.profitmandi.web.enumuration.UserStatus;
|
| 58 |
import com.spice.profitmandi.web.processor.GoogleLoginProcessor;
|
55 |
import com.spice.profitmandi.web.processor.GoogleLoginProcessor;
|
| 59 |
import com.spice.profitmandi.web.req.UserAddRoleRequest;
|
56 |
import com.spice.profitmandi.web.req.UserAddRoleRequest;
|
| 60 |
import com.spice.profitmandi.web.req.UserRequest;
|
57 |
import com.spice.profitmandi.web.req.UserRequest;
|
| Line 106... |
Line 103... |
| 106 |
AddressRepository addressRepository;
|
103 |
AddressRepository addressRepository;
|
| 107 |
|
104 |
|
| 108 |
@Autowired
|
105 |
@Autowired
|
| 109 |
GoogleLoginProcessor googleLoginProcessor;
|
106 |
GoogleLoginProcessor googleLoginProcessor;
|
| 110 |
|
107 |
|
| 111 |
@Autowired
|
108 |
|
| 112 |
MigrationUtil migrationUtil;
|
- |
|
| 113 |
|
109 |
|
| 114 |
@Autowired
|
110 |
@Autowired
|
| 115 |
UserService userService;
|
111 |
UserService userService;
|
| 116 |
|
112 |
|
| 117 |
@SuppressWarnings("unchecked")
|
113 |
@SuppressWarnings("unchecked")
|
| Line 437... |
Line 433... |
| 437 |
}
|
433 |
}
|
| 438 |
return responseSender.ok(responseMap);
|
434 |
return responseSender.ok(responseMap);
|
| 439 |
|
435 |
|
| 440 |
}
|
436 |
}
|
| 441 |
|
437 |
|
| 442 |
@RequestMapping(value = ProfitMandiConstants.URL_ADMIN_MIGRATE, method = RequestMethod.GET)
|
- |
|
| 443 |
@ApiImplicitParams({
|
- |
|
| 444 |
@ApiImplicitParam(name = "Auth-Token", value = "Auth-Token", required = true, dataType = "string", paramType = "header") })
|
- |
|
| 445 |
public ResponseEntity<?> migrate(HttpServletRequest request, @RequestParam(name = "userId") int userId) {
|
- |
|
| 446 |
LOGGER.info("requested url : " + request.getRequestURL().toString());
|
- |
|
| 447 |
migrationUtil.migrateUserToRetailer();
|
- |
|
| 448 |
return responseSender.ok(ResponseCodeHolder.getMessage("OK_1000"));
|
- |
|
| 449 |
}
|
- |
|
| 450 |
}
|
438 |
}
|