server_commit
This commit is contained in:
@@ -126,14 +126,14 @@ public class PwdUtil {
|
||||
// System.out.println(dbPwd);
|
||||
// System.out.println(s);
|
||||
|
||||
String pwd = "006207";
|
||||
String pwd = "004512";
|
||||
String dbPwd = PwdUtil.doSm4CbcEncrypt(pwd);
|
||||
System.out.println(dbPwd);
|
||||
|
||||
// 7fdc9e096de7e2c18e4ed4efa16f50f8
|
||||
|
||||
// e43646c461a8ee364c569552225e28be
|
||||
// String ddPwd = PwdUtil.doSm4CbcDecrypt("7fdc9e096de7e2c18e4ed4efa16f50f8");
|
||||
// String ddPwd = PwdUtil.doSm4CbcDecrypt("d3b42e17dba55dbe9bfa471c8ff191d9");
|
||||
// System.out.println(ddPwd);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,10 +6,12 @@ import io.v.nutz.base.utils.LoginUtil;
|
||||
import io.v.nutz.base.utils.PwdUtil;
|
||||
import io.v.nutz.sys.models.Sys_user;
|
||||
import io.v.nutz.sys.services.SysUserService;
|
||||
import io.v.nutz.web.commons.base.Globals;
|
||||
import io.v.nutz.web.commons.shiro.exception.CaptchaEmptyException;
|
||||
import io.v.nutz.web.commons.shiro.exception.CaptchaIncorrectException;
|
||||
import io.v.nutz.web.commons.shiro.filter.PlatformAuthenticationFilter;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.apache.shiro.authc.AuthenticationException;
|
||||
@@ -29,10 +31,13 @@ import org.nutz.mvc.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
@IocBean
|
||||
@At("/mobile/login")
|
||||
@Ok("json")
|
||||
@Slf4j
|
||||
public class mobileLoginController {
|
||||
|
||||
@Inject
|
||||
@@ -164,4 +169,31 @@ public class mobileLoginController {
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解绑微信openId
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@At
|
||||
@Ok("re")
|
||||
public String clearWxOpenId() {
|
||||
try {
|
||||
sysUserService.update(Chain.make("openId", null), Cnd.where("id", "=", ShiroUtil.getPrincipalProperty("id")));
|
||||
Subject subject = SecurityUtils.getSubject();
|
||||
Sys_user user = (Sys_user) subject.getPrincipal();
|
||||
subject.logout();
|
||||
sysUserService.deleteCache(user.getId());
|
||||
return ">>:" + "https://zhgh.hrbnu.edu.cn/platform/wechat/oauth";
|
||||
} catch (SessionException ise) {
|
||||
log.debug("Encountered session exception during logout. This can generally safely be ignored.", ise);
|
||||
return ">>:" + "https://zhgh.hrbnu.edu.cn/platform/wechat/oauth";
|
||||
} catch (Exception e) {
|
||||
log.debug("Logout error", e);
|
||||
return ">>:" + "https://zhgh.hrbnu.edu.cn/platform/wechat/oauth";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -584,9 +584,9 @@ public class WelfareCommonController {
|
||||
entityList.add(new ExcelExportEntity("所选福利", "gift_name", 20));
|
||||
}
|
||||
|
||||
if (welfareProject.getProvideMode().equals(WelfareProvideMode.PERSONAL.getCode())) {
|
||||
entityList.add(new ExcelExportEntity("配送地址", "receiveAddress", 60));
|
||||
}
|
||||
// if (welfareProject.getProvideMode().equals(WelfareProvideMode.PERSONAL.getCode())) {
|
||||
entityList.add(new ExcelExportEntity("取货地址", "receiveAddress", 60));
|
||||
// }
|
||||
|
||||
try {
|
||||
ViTool.excelResponse(response, "会员福利领取情况.xls");
|
||||
|
||||
@@ -120,19 +120,16 @@ public class WelfareListController {
|
||||
wus.userSign,
|
||||
wus.courierNumber,
|
||||
GROUP_CONCAT(
|
||||
DISTINCT
|
||||
CONCAT(
|
||||
wuso.optionName,
|
||||
IF(wus.receiveAddress IS NOT NULL AND wus.receiveAddress != '', CONCAT('(', wus.receiveAddress, ')'), '')
|
||||
)
|
||||
) AS receiveAddress,
|
||||
IF
|
||||
( wus.receiveAddress IS NOT NULL AND wus.receiveAddress != '', wus.receiveAddress, '' )
|
||||
) AS receiveAddress,
|
||||
GROUP_CONCAT( DISTINCT wuso.optionName, '(', wus.selectNum, '份)' ) AS gist_list
|
||||
FROM
|
||||
view_welfare_list wl
|
||||
LEFT JOIN welfare_project_user_selection wus ON wus.welfareId = wl.projectId
|
||||
LEFT JOIN welfare_project_user_selection wus ON wus.welfareId = wl.projectId
|
||||
AND wus.selectUserId = wl.id
|
||||
LEFT JOIN welfare_project_subject_option wuso ON wus.selectOptionId = wuso.id
|
||||
LEFT JOIN welfare_courier_number wcn on wcn.selectUserId = wl.id
|
||||
LEFT JOIN welfare_courier_number wcn on wcn.selectUserId = wl.id
|
||||
LEFT JOIN welfare_project wp ON wp.id = wus.welfareId
|
||||
$condition
|
||||
""");
|
||||
|
||||
@@ -24,6 +24,7 @@ import org.nutz.ioc.aop.Aop;
|
||||
import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.Lang;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
import org.nutz.mvc.annotation.Param;
|
||||
@@ -32,6 +33,7 @@ import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @ClassName WelfareChooseController
|
||||
@@ -126,6 +128,12 @@ public class WelfareUserChooseController {
|
||||
selection.setReceiveAddress(receiveAddress);
|
||||
insertList.add(selection);
|
||||
});
|
||||
|
||||
List<WelfareUserSelection> list = insertList.stream().filter(v -> v.getSelectNum() > 1).collect(Collectors.toList());
|
||||
if (Lang.isNotEmpty(list)) {
|
||||
return Result.error();
|
||||
}
|
||||
|
||||
simpleService.dao().insert(insertList);
|
||||
simpleService.dao().update(WelfareList.class,
|
||||
Chain.make("isReceive", true),
|
||||
@@ -170,6 +178,9 @@ public class WelfareUserChooseController {
|
||||
for (WelfareUserSelection welfareUserSelection : welfareUserSelections) {
|
||||
welfareUserSelection.setSelectUserId(userId);
|
||||
welfareUserSelection.setSelectTime(new Date());
|
||||
if (welfareUserSelection.getSelectNum() > 1) {
|
||||
return Result.error("福利选择限制超过最大限制");
|
||||
}
|
||||
}
|
||||
|
||||
simpleService.dao().insert(welfareUserSelections);
|
||||
|
||||
Reference in New Issue
Block a user