|
@@ -30,6 +30,7 @@ import org.springframework.web.bind.annotation.ModelAttribute;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
import com.lemon.lifecenter.common.LifeCenterConfigVO;
|
|
@@ -252,6 +253,34 @@ public class CenterController extends LifeCenterController {
|
|
|
return mv;
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping( value="/passwordReset", method = RequestMethod.POST )
|
|
|
+ @ResponseBody
|
|
|
+ public boolean passwordReset(
|
|
|
+ @RequestParam( value="staffId", required = true ) String id,
|
|
|
+ @RequestParam( value="type", required = true ) String type) throws Exception {
|
|
|
+
|
|
|
+ boolean result = false;
|
|
|
+ String pw = "";
|
|
|
+ StaffDTO dto = new StaffDTO();
|
|
|
+ dto.setId(id);
|
|
|
+ if (type.equals("staff")) {
|
|
|
+// pw = LifeCenterFunction.aesEncrypt(config.aesKey, config.IV, config.staffResetPw);
|
|
|
+ pw = LifeCenterFunction.sha256Encrypt(config.staffResetPw);
|
|
|
+ } else {
|
|
|
+// pw = LifeCenterFunction.aesEncrypt(config.aesKey, config.IV, config.centerResetPw);
|
|
|
+ pw = LifeCenterFunction.sha256Encrypt(config.centerResetPw);
|
|
|
+ }
|
|
|
+ dto.setPassword(pw);
|
|
|
+
|
|
|
+ int rts = memberService.updateMemberPwReset(dto);
|
|
|
+
|
|
|
+ if (rts == 1) {
|
|
|
+ result = true;
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
@RequestMapping( value="/excel", method=RequestMethod.POST )
|
|
|
public void getCenterList(HttpServletRequest request,HttpServletResponse response) {
|
|
|
CenterInfoDTO dto = new CenterInfoDTO();
|