Commit b87dadfa by huluobin

update

parent d54238d7
...@@ -7,24 +7,25 @@ public class CookieUtil { ...@@ -7,24 +7,25 @@ public class CookieUtil {
/** /**
* 获取 Cookie * 获取 Cookie
*
* @param request * @param request
* @return * @return
*/ */
public static Cookie[] getCookieArray(HttpServletRequest request){ public static Cookie[] getCookieArray(HttpServletRequest request) {
Cookie[] cookies = request.getCookies(); return request.getCookies();
return cookies;
} }
/** /**
* 根据 cookieName 获取 cookieValue * 根据 cookieName 获取 cookieValue
*
* @return * @return
*/ */
public static String getBLUserAcct(HttpServletRequest request){ public static String getBLUserAcct(HttpServletRequest request) {
Cookie[] cookieArray = getCookieArray(request); Cookie[] cookieArray = getCookieArray(request);
if (null != cookieArray && cookieArray.length >= 1 ){ if (null != cookieArray && cookieArray.length >= 1) {
for (Cookie cookie : cookieArray){ for (Cookie cookie : cookieArray) {
if ("BLUserAcct".equals(cookie.getName())){ if ("BLUserAcct".equals(cookie.getName())) {
return cookie.getValue(); return cookie.getValue();
} }
} }
......
...@@ -358,6 +358,24 @@ public class OtherApplicationTests { ...@@ -358,6 +358,24 @@ public class OtherApplicationTests {
mailService.sendSimpleMail("robbendev@qq.com", "pre", "test"); mailService.sendSimpleMail("robbendev@qq.com", "pre", "test");
} }
@Resource
CostTypeDao costTypeDao;
@Rollback(value = false)
@Test
public void testType() {
costTypeDao.selectList(new LambdaQueryWrapper<CostTypeDomain>()
.eq(CostTypeDomain::getCostTemplateType, CostTypeDomain.feeType))
.forEach(costTypeDomain -> {
CostTypeDomain item = new CostTypeDomain();
item.setCostTemplateType(CostTypeDomain.borrow);
item.setAccountingSubjectNo("1345912843756503041");
item.setDescription(costTypeDomain.getDescription());
item.setTypeNo(IdWorker.getIdStr());
item.setTypeName(costTypeDomain.getTypeName());
costTypeDao.insert(item);
});
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment