Commit 2bccf2fa authored by 竹天卫's avatar 竹天卫

校核计算 测试完成 加上校验版本

parent 03f25c1d
......@@ -25,7 +25,7 @@ import org.springframework.web.filter.OncePerRequestFilter;
@Component
public class TokenFilter extends OncePerRequestFilter {
private static final Logger log = LoggerFactory.getLogger("WeiXinService");
private static final Logger log = LoggerFactory.getLogger("TokenFilter");
public static final String TOKEN_KEY = "Authorization";
......
......@@ -265,10 +265,12 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
for (String teamId : teamIdS) {
Team team = teamMapper.selectById(Integer.valueOf(teamId));
if (team != null) {
if(!teamNameList.contains(teamId)){
charge = charge.compareTo(BigDecimal.ZERO) == 0 ? team.getCharge() : (charge.add(team.getCharge()));
teamNameList.add(team.getName());
}
}
}
//选择Mg必须选择Ca;选择Al必须选择Fe
if(teamNameList.contains("MgO")){
if(!teamNameList.contains("CaO")){
......@@ -2722,7 +2724,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
} else if (j == 10) {
obj = checkMethodStr;
} else {
obj = m.get(headers[j]).toString();
obj = m.get(headers[j])!= null? m.get(headers[j]).toString() : "" ;
//如果序号带小数点 去除.0,保留整数
if (j == 0) {
obj = obj.split("\\.")[0];
......
......@@ -47,7 +47,7 @@ public class WeiXinService {
System.out.println("==================code===================");
System.out.println(code);
try {
String accessToken = null;
/*String accessToken = null;
if (type.equals("PC")) {
accessToken = getAccessToken();
} else if (type.equals("APP")) {
......@@ -64,10 +64,10 @@ public class WeiXinService {
String UserId = jsonObject.getString("UserId");
System.out.println("==================UserId===================");
System.out.println(UserId);
JSONObject userJson = getUser(accessToken, UserId);
JSONObject userJson = getUser(accessToken, UserId);*/
QueryWrapper<SysUser> wrapper = new QueryWrapper<>();
wrapper.eq("phone", userJson.get("mobile"));
// wrapper.eq("phone", code); //暂时用手机号代替code
// wrapper.eq("phone", userJson.get("mobile"));
wrapper.eq("phone", code); //暂时用手机号代替code
SysUser sysUser = userService.getOne(wrapper);
if (sysUser == null) {
return BaseResponse.errorMsg("非系统用户不允许登录!");
......@@ -83,8 +83,8 @@ public class WeiXinService {
sysUser.getName(), sysUser.getPhone());
System.out.println(token);
redisUtil.setString(sysUser.getId().toString(), token, 3600);
sysUser.setWxId(UserId);
userService.updateById(sysUser);
// sysUser.setWxId(UserId);
// userService.updateById(sysUser);
return BaseResponse.okData(token);
} catch (Exception e) {
return BaseResponse.errorMsg(e.getMessage());
......
......@@ -10,22 +10,22 @@ package cn.wise.sc.cement.business.util.weixin;
public interface Global {
//企业ID
public final static String corpId = "ww348f91b2573c1867";
//企业应用的id,整型。可在应用的设置页面查看
public final static int agentId = 1000002;
public final static int agentIdPC = 1000003;
//企业ID
public final static String corpId = "ww348f91b2573c1867";
//应用的凭证密钥
public final static String agentSecret = "gFa_7XvXtCaoeAYERzjRwwz_OTJkJfgBb8weOKjmI3o";
public final static String agentSecretPC = "itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A";
//编译后的回调地址
public final static String backUrl = "https%3a%2f%2fprogram.oxogroup.com%2flab-system";
//实验室管理系统链接
public final static String systemUrl = "<a href=\"https://open.weixin.qq.com/connect/oauth2/authorize?appid="+corpId+"&redirect_uri="+backUrl+"%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect\">天津院实验室管理系统" + "</a>,";
//应用的凭证密钥PC
public final static String agentSecretPC = "itCLYcwl9ggA9VfZam_iz96Ikp9StDFfVr4Adb0yY7A";
public final static String systemUrl =
"<a href=\"https://open.weixin.qq.com/connect/oauth2/authorize?appid="+corpId+"&redirect_uri="+backUrl+"%2f&response_type=code&scope=snsapi_base&state=#wechat_redirect\">天津院实验室管理系统" + "</a>,";
/**
* 微信公众平台,获取AccessToken的接口地址,Https请求方式:GET
......
......@@ -7,8 +7,8 @@ spring:
active: dev
datasource:
# 192.168.110.85 admin!@#123
# url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://81.68.92.175:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
# url: jdbc:mysql://81.68.92.175:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: admin!@#123
driverClassName: com.mysql.cj.jdbc.Driver
......
......@@ -4,7 +4,7 @@ fastdfs.charset=UTF-8
fastdfs.http.tracker_http_port=8888
fastdfs.http.anti_steal_token=no
fastdfs.http.secret_key=FastDFS1234567890
fastdfs.tracker_servers=192.168.110.85:22122
fastdfs.tracker_servers=localhost:22122
#fastdfs.tracker_servers=localhost:22122
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