|
|
@@ -2,10 +2,7 @@
|
|
|
package com.loygra.cas.controller.oss;
|
|
|
|
|
|
import java.text.ParseException;
|
|
|
-import java.util.ArrayList;
|
|
|
-import java.util.Calendar;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
+import java.util.*;
|
|
|
import java.util.stream.Collector;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -16,6 +13,7 @@ import com.loygra.cas.service.OssCasService;
|
|
|
import com.loygra.service.LspCodeService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
@@ -305,7 +303,32 @@ public class CasOssViewController extends BaseController {
|
|
|
return getModelAndView(resp, resultMap, "oss/cas/user_manages", "info");
|
|
|
}
|
|
|
|
|
|
+ @RequestMapping(method = RequestMethod.GET, value = "/member/downcertificat")
|
|
|
+ public ModelAndView downloadcertificatInfo(HttpServletRequest req, HttpServletResponse resp){
|
|
|
+ Map<String, Object> resultMap = getResultMap();
|
|
|
+ LspUserInfoBO u = (LspUserInfoBO)req.getSession().getAttribute("user");
|
|
|
+ CasParam p = new CasParam();
|
|
|
+ p.setLsp_user_id(u.getId());
|
|
|
+ Map<String, Object> res = ossCasService.selectOneCasUser(p);
|
|
|
+ CasParam pu = (CasParam)getData(res);
|
|
|
+ pu.getCas_user().setLast_downloadtime(new Date());
|
|
|
+ ossCasService.updateCasUser(pu);
|
|
|
+ return new ModelAndView();
|
|
|
+ }
|
|
|
|
|
|
+
|
|
|
+ @RequestMapping(method = RequestMethod.POST, value = "/member/setcertificat")
|
|
|
+ public ModelAndView setcertificatInfo(HttpServletRequest req, HttpServletResponse resp, @RequestBody Map<String,Object> data){
|
|
|
+
|
|
|
+ CasParam p = new CasParam();
|
|
|
+ p.setLsp_user_id(Long.parseLong(data.get("userid").toString()));
|
|
|
+ Map<String, Object> res = ossCasService.selectOneCasUser(p);
|
|
|
+ CasParam pu = (CasParam)getData(res);
|
|
|
+ pu.getCas_user().setAid(Long.parseLong(data.get("ctype").toString()));
|
|
|
+ pu.getCas_user().setExp_time((data.get("expdate").toString()));
|
|
|
+ ossCasService.updateCasUser(pu);
|
|
|
+ return new ModelAndView();
|
|
|
+ }
|
|
|
@RequestMapping(method = RequestMethod.GET, value = "/member/certificat")
|
|
|
public ModelAndView certificatInfo(HttpServletRequest req, HttpServletResponse resp) throws ParseException {
|
|
|
Map<String, Object> resultMap = getResultMap();
|
|
|
@@ -343,7 +366,7 @@ public class CasOssViewController extends BaseController {
|
|
|
bh1.insert(0, "0");
|
|
|
}
|
|
|
}
|
|
|
- if(pu.getCas_user().getAid()==null){
|
|
|
+ if(pu.getCas_user().getAid()==null||pu.getCas_user().getAid().equals(0L)){
|
|
|
bh = "暂未设置";
|
|
|
}else if(pu.getCas_user().getAid().equals(1L)){
|
|
|
bh = "GX2"+bh1;
|