Subversion Repositories SmartDukaan

Rev

Rev 25192 | Rev 25570 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25192 Rev 25366
Line 28... Line 28...
28
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
28
import com.spice.profitmandi.dao.repository.dtr.UserRoleRepository;
29
import com.spice.profitmandi.service.AuthService;
29
import com.spice.profitmandi.service.AuthService;
30
import com.spice.profitmandi.web.model.LoginDetails;
30
import com.spice.profitmandi.web.model.LoginDetails;
31
import com.spice.profitmandi.web.util.CookiesProcessor;
31
import com.spice.profitmandi.web.util.CookiesProcessor;
32
 
32
 
33
import in.shop2020.model.v1.user.UserContextService.authenticateUser_args;
-
 
34
 
33
 
35
@Controller
34
@Controller
36
@Transactional(rollbackFor = Throwable.class)
35
@Transactional(rollbackFor = Throwable.class)
37
public class AuthUserController {
36
public class AuthUserController {
38
 
37
 
Line 83... Line 82...
83
	public String createAuthUser(HttpServletRequest request,
82
	public String createAuthUser(HttpServletRequest request,
84
			@RequestParam(name = ProfitMandiConstants.FIRST_NAME, defaultValue = "") String firstName,
83
			@RequestParam(name = ProfitMandiConstants.FIRST_NAME, defaultValue = "") String firstName,
85
			@RequestParam(name = ProfitMandiConstants.LAST_NAME, defaultValue = "") String lastName,
84
			@RequestParam(name = ProfitMandiConstants.LAST_NAME, defaultValue = "") String lastName,
86
			@RequestParam(name = ProfitMandiConstants.EMAIL_ID, defaultValue = "") String emailId,
85
			@RequestParam(name = ProfitMandiConstants.EMAIL_ID, defaultValue = "") String emailId,
87
			@RequestParam(name = ProfitMandiConstants.MOBILE_NUMBER, defaultValue = "") String mobileNumber,
86
			@RequestParam(name = ProfitMandiConstants.MOBILE_NUMBER, defaultValue = "") String mobileNumber,
-
 
87
			@RequestParam(name = ProfitMandiConstants.GMAIL_ID, defaultValue = "") String gmailId,
88
			@RequestParam(name = "offset", defaultValue = "0") int offset,
88
			@RequestParam(name = "offset", defaultValue = "0") int offset,
89
			@RequestParam(name = "limit", defaultValue = "10") int limit, Model model)
89
			@RequestParam(name = "limit", defaultValue = "10") int limit, Model model)
90
			throws ProfitMandiBusinessException {
90
			throws ProfitMandiBusinessException {
91
		AuthUser authUser = null;
91
		AuthUser authUser = null;
92
		User user = null;
92
		User user = null;
Line 128... Line 128...
128
		authUser = new AuthUser();
128
		authUser = new AuthUser();
129
		authUser.setEmailId(emailId);
129
		authUser.setEmailId(emailId);
130
		authUser.setFirstName(firstName);
130
		authUser.setFirstName(firstName);
131
		authUser.setLastName(lastName);
131
		authUser.setLastName(lastName);
132
		authUser.setMobileNumber(mobileNumber);
132
		authUser.setMobileNumber(mobileNumber);
-
 
133
		authUser.setGmailId(gmailId);
-
 
134
		
133
		authUser.setCreatedTimestamp(LocalDateTime.now());
135
		authUser.setCreatedTimestamp(LocalDateTime.now());
134
		authService.addAuthUser(authUser);
136
		authService.addAuthUser(authUser);
135
 
137
 
136
		List<AuthUser> authUsers = authRepository.selectAll(offset, limit);
138
		List<AuthUser> authUsers = authRepository.selectAll(offset, limit);
137
		long size = authRepository.selectCountAuthUser();
139
		long size = authRepository.selectCountAuthUser();
Line 177... Line 179...
177
		user.setGmailId(gmailId);
179
		user.setGmailId(gmailId);
178
		authRepository.persist(user);
180
		authRepository.persist(user);
179
		model.addAttribute("response", "true");
181
		model.addAttribute("response", "true");
180
		return "response";
182
		return "response";
181
	}
183
	}
-
 
184
	
-
 
185
 
182
}
186
}