Commit c8da72b2 by 吴迪

Merge remote-tracking branch 'origin/master'

parents 2a702615 439087c8
...@@ -788,3 +788,15 @@ alter table index_carousel_manage add is_show varchar(2) not null default (1); ...@@ -788,3 +788,15 @@ alter table index_carousel_manage add is_show varchar(2) not null default (1);
##文件夹内容上传 2021-12-18 Movie ./redis-server.exe redis.windows.conf ./redis-server.exe redis.windows-service.conf ##文件夹内容上传 2021-12-18 Movie ./redis-server.exe redis.windows.conf ./redis-server.exe redis.windows-service.conf
knowledgeInfo id 304跳转路径修改为http://192.168.0.77/search/check
1、上线后需要数据清洗,测试环境没有进行数据清洗
http://192.168.0.77:9091/office/uploadFileResource/UserFiles/Image/2019image/jd01.png
2、数据清洗,第三方网站换了域名
http://www.gds.org.cn/login.aspx更换成了:
https://www.gds.org.cn/
http://www.gds.org.cn/login.aspx更换成了:
https://www.gds.org.cn/
\ No newline at end of file
...@@ -2,6 +2,9 @@ package io.office.modules.manage.controller; ...@@ -2,6 +2,9 @@ package io.office.modules.manage.controller;
import java.util.Arrays; import java.util.Arrays;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.office.modules.app.annotation.Login; import io.office.modules.app.annotation.Login;
import io.office.modules.sys.controller.AbstractController; import io.office.modules.sys.controller.AbstractController;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -91,6 +94,9 @@ public class MemberController extends AbstractController { ...@@ -91,6 +94,9 @@ public class MemberController extends AbstractController {
// @RequiresPermissions("manage:member:info") // @RequiresPermissions("manage:member:info")
public R info(){ public R info(){
Long memberUserId = getMemberUserId(); Long memberUserId = getMemberUserId();
/*
QueryWrapper<MemberEntity> queryWrapper = new QueryWrapper<MemberEntity>();
queryWrapper.eq("phone",memberUserId);*/
MemberEntity member = memberService.getById(memberUserId); MemberEntity member = memberService.getById(memberUserId);
return R.ok().put("data", member); return R.ok().put("data", member);
......
...@@ -30,10 +30,10 @@ import org.springframework.web.multipart.MultipartFile; ...@@ -30,10 +30,10 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
/** /**
* ${comments} * ${comments}
* 企业认证信息 * 企业认证信息
*
* @author wudi * @author wudi
* @email * @email
* @date 2021-12-11 15:15:19 * @date 2021-12-11 15:15:19
...@@ -50,7 +50,9 @@ public class TycpdmFirmController extends AbstractController { ...@@ -50,7 +50,9 @@ public class TycpdmFirmController extends AbstractController {
private TycpdmFirmChangeService tycpdmFirmChangeService; private TycpdmFirmChangeService tycpdmFirmChangeService;
@Autowired @Autowired
private MemberDao memberDao; private MemberDao memberDao;
/* *//** /* */
/**
* 列表 * 列表
*//* *//*
@RequestMapping("/api/list") @RequestMapping("/api/list")
...@@ -66,18 +68,17 @@ public class TycpdmFirmController extends AbstractController { ...@@ -66,18 +68,17 @@ public class TycpdmFirmController extends AbstractController {
return R.ok().put("data", page); return R.ok().put("data", page);
}*/ }*/
@RequestMapping("/api/test") @RequestMapping("/api/test")
@Login @Login
public void testRed(HttpServletResponse response) throws Exception{ public void testRed(HttpServletResponse response) throws Exception {
response.sendRedirect("http://manage.gds.org.cn/Original/WWW/registerOrLoginFromAncc.aspx?uname=test_tru&pwd=88DA15B9F9F602F0D32D46808652B06DC6E939D1424CE39F69A2AC39743F7ED7591975685B543E1D&regist_or_login_from_ancc=d67626ce2c09cbb4c6867eb65c945b53&dept=-2"); response.sendRedirect("http://manage.gds.org.cn/Original/WWW/registerOrLoginFromAncc.aspx?uname=test_tru&pwd=88DA15B9F9F602F0D32D46808652B06DC6E939D1424CE39F69A2AC39743F7ED7591975685B543E1D&regist_or_login_from_ancc=d67626ce2c09cbb4c6867eb65c945b53&dept=-2");
} }
/** /**
* 列表 * 列表
*/ */
@RequestMapping("/authApi/findlist") @RequestMapping("/authApi/findlist")
public R findlist(@RequestBody Map<String, Object> params){ public R findlist(@RequestBody Map<String, Object> params) {
Page<TycpdmFirmEntity> findlist = tycpdmFirmService.findlist(params, Page<TycpdmFirmEntity> findlist = tycpdmFirmService.findlist(params,
new Page(Integer.valueOf(params.get("page").toString()), new Page(Integer.valueOf(params.get("page").toString()),
Integer.valueOf(params.get("limit").toString()))); Integer.valueOf(params.get("limit").toString())));
...@@ -91,7 +92,7 @@ public class TycpdmFirmController extends AbstractController { ...@@ -91,7 +92,7 @@ public class TycpdmFirmController extends AbstractController {
*/ */
@RequestMapping("/info/{fId}") @RequestMapping("/info/{fId}")
// @RequiresPermissions("manage:tycpdmfirm:info") // @RequiresPermissions("manage:tycpdmfirm:info")
public R info(@PathVariable("fId") Integer fId){ public R info(@PathVariable("fId") Integer fId) {
TycpdmFirmEntity tycpdmFirm = tycpdmFirmService.getById(fId); TycpdmFirmEntity tycpdmFirm = tycpdmFirmService.getById(fId);
return R.ok().put("tycpdmFirm", tycpdmFirm); return R.ok().put("tycpdmFirm", tycpdmFirm);
...@@ -99,6 +100,7 @@ public class TycpdmFirmController extends AbstractController { ...@@ -99,6 +100,7 @@ public class TycpdmFirmController extends AbstractController {
/** /**
* 保存(保存企业信息) status 申请状态 1.新增 2.修改 * 保存(保存企业信息) status 申请状态 1.新增 2.修改
*
* @param * @param
* @param * @param
* @return * @return
...@@ -108,37 +110,37 @@ public class TycpdmFirmController extends AbstractController { ...@@ -108,37 +110,37 @@ public class TycpdmFirmController extends AbstractController {
public R save(@RequestBody Map body) throws InvocationTargetException, IllegalAccessException { public R save(@RequestBody Map body) throws InvocationTargetException, IllegalAccessException {
MemberEntity memberUser = getMemberUser(); MemberEntity memberUser = getMemberUser();
Integer id= tycpdmFirmService.saveTycpdmFirmInfo(body,memberUser.getUsername()); Integer id = tycpdmFirmService.saveTycpdmFirmInfo(body, memberUser.getUsername());
return R.ok().put("data",id); return R.ok().put("data", id);
} }
public static void main(String[] args) throws InvocationTargetException, IllegalAccessException { public static void main(String[] args) throws InvocationTargetException, IllegalAccessException {
/* String s = MD5Util.md5Encrypt32Upper("GS1_20201013"); /* String s = MD5Util.md5Encrypt32Upper("GS1_20201013");
System.out.println(s);*/ System.out.println(s);*/
String pass="GS1_20201013"; String pass = "GS1_20201013";
String pass_MD5 = MD5Util.md5Encrypt32Lower(pass); String pass_MD5 = MD5Util.md5Encrypt32Lower(pass);
System.out.println("pass_MD5 "+pass_MD5); System.out.println("pass_MD5 " + pass_MD5);
// String userName_M = DESUtils.byteToHexString(DESUtils.DES_CBC_Encrypt("1165004".getBytes(),"loginkey".getBytes())); // String userName_M = DESUtils.byteToHexString(DESUtils.DES_CBC_Encrypt("1165004".getBytes(),"loginkey".getBytes()));
String pass_M = DESUtils.byteToHexString(DESUtils.DES_CBC_Encrypt(pass_MD5.getBytes(),"appsGdsn".getBytes())); String pass_M = DESUtils.byteToHexString(DESUtils.DES_CBC_Encrypt(pass_MD5.getBytes(), "appsGdsn".getBytes()));
// System.out.println(userName_M); // System.out.println(userName_M);
System.out.println(pass_M); System.out.println(pass_M);
} }
/** /**
* 根据用户名获取企业认证信息 * 根据用户名获取企业认证信息
*/ */
@RequestMapping("/authApi/findUserName") @RequestMapping("/authApi/findUserName")
// @RequiresPermissions("manage:tycpdmfirm:save") // @RequiresPermissions("manage:tycpdmfirm:save")
public R findUserName(@RequestParam("userName") String userName){ public R findUserName(@RequestParam("userName") String userName) {
//查询 业务类型 1.首次 2.变更 //查询 业务类型 1.首次 2.变更
int logoutFlag=tycpdmFirmService.findLogoutFlag(userName); int logoutFlag = tycpdmFirmService.findLogoutFlag(userName);
JSONObject tycpdmFirmEntity=tycpdmFirmService.findUserName(logoutFlag,userName); JSONObject tycpdmFirmEntity = tycpdmFirmService.findUserName(logoutFlag, userName);
R ok = R.ok(); R ok = R.ok();
tycpdmFirmEntity.put("status",logoutFlag); tycpdmFirmEntity.put("status", logoutFlag);
ok.put("data",tycpdmFirmEntity); ok.put("data", tycpdmFirmEntity);
return ok; return ok;
} }
...@@ -147,7 +149,7 @@ public class TycpdmFirmController extends AbstractController { ...@@ -147,7 +149,7 @@ public class TycpdmFirmController extends AbstractController {
*/ */
@RequestMapping("/authApi/update") @RequestMapping("/authApi/update")
// @RequiresPermissions("manage:tycpdmfirm:update") // @RequiresPermissions("manage:tycpdmfirm:update")
public R update(@RequestBody Map body){ public R update(@RequestBody Map body) {
TycpdmFirmEntity tycpdmFirm = new TycpdmFirmEntity(); TycpdmFirmEntity tycpdmFirm = new TycpdmFirmEntity();
try { try {
BeanUtils.populate(tycpdmFirm, body); BeanUtils.populate(tycpdmFirm, body);
...@@ -166,7 +168,7 @@ public class TycpdmFirmController extends AbstractController { ...@@ -166,7 +168,7 @@ public class TycpdmFirmController extends AbstractController {
*/ */
@RequestMapping("/delete") @RequestMapping("/delete")
// @RequiresPermissions("manage:tycpdmfirm:delete") // @RequiresPermissions("manage:tycpdmfirm:delete")
public R delete(@RequestBody Integer[] fIds){ public R delete(@RequestBody Integer[] fIds) {
tycpdmFirmService.removeByIds(Arrays.asList(fIds)); tycpdmFirmService.removeByIds(Arrays.asList(fIds));
return R.ok(); return R.ok();
...@@ -178,7 +180,7 @@ public class TycpdmFirmController extends AbstractController { ...@@ -178,7 +180,7 @@ public class TycpdmFirmController extends AbstractController {
*/ */
@RequestMapping("/authApi/findTycpdmFirmLogoutFlagCount") @RequestMapping("/authApi/findTycpdmFirmLogoutFlagCount")
// @RequiresPermissions("manage:tycpdmfirm:delete") // @RequiresPermissions("manage:tycpdmfirm:delete")
public R findTycpdmFirmLogoutFlagCount(){ public R findTycpdmFirmLogoutFlagCount() {
/*Integer id=getMemberUserId().intValue(); /*Integer id=getMemberUserId().intValue();
if(id==null){ if(id==null){
return R.error("用户信息有误"); return R.error("用户信息有误");
...@@ -186,8 +188,8 @@ public class TycpdmFirmController extends AbstractController { ...@@ -186,8 +188,8 @@ public class TycpdmFirmController extends AbstractController {
MemberEntity userMember = getMemberUser();*/ MemberEntity userMember = getMemberUser();*/
MemberEntity memberUser = getMemberUser(); MemberEntity memberUser = getMemberUser();
Map<String,Integer> map=tycpdmFirmService.findTycpdmFirmLogoutFlagCount(memberUser); Map<String, Integer> map = tycpdmFirmService.findTycpdmFirmLogoutFlagCount(memberUser);
return R.ok().put("data",map); return R.ok().put("data", map);
} }
/** /**
...@@ -195,15 +197,15 @@ public class TycpdmFirmController extends AbstractController { ...@@ -195,15 +197,15 @@ public class TycpdmFirmController extends AbstractController {
*/ */
@RequestMapping("/authApi/uploadFile") @RequestMapping("/authApi/uploadFile")
// @RequiresPermissions("manage:tycpdmfirm:delete") // @RequiresPermissions("manage:tycpdmfirm:delete")
public R uploadFile(@RequestParam("file") MultipartFile file,@RequestParam("id") Integer id,@RequestParam("status") Integer status){ public R uploadFile(@RequestParam("file") MultipartFile file, @RequestParam("id") Integer id, @RequestParam("status") Integer status) {
try { try {
if (status==1){ if (status == 1) {
tycpdmFirmService.uploadFile(file,id); tycpdmFirmService.uploadFile(file, id);
return R.ok(); return R.ok();
}else if (status==2){ } else if (status == 2) {
tycpdmFirmChangeService.uploadFile(file,id); tycpdmFirmChangeService.uploadFile(file, id);
return R.ok(); return R.ok();
}else { } else {
return R.error("请前端人员传递业务类型 变更过新增"); return R.error("请前端人员传递业务类型 变更过新增");
} }
...@@ -218,10 +220,10 @@ public class TycpdmFirmController extends AbstractController { ...@@ -218,10 +220,10 @@ public class TycpdmFirmController extends AbstractController {
@RequestMapping("/authApi/uploadFileOne") @RequestMapping("/authApi/uploadFileOne")
// @RequiresPermissions("manage:tycpdmfirm:delete") // @RequiresPermissions("manage:tycpdmfirm:delete")
@Login @Login
public R uploadFileOne(@RequestParam("file") MultipartFile file){ public R uploadFileOne(@RequestParam("file") MultipartFile file) {
try { try {
String filePath = tycpdmFirmService.uploadFileOne(file); String filePath = tycpdmFirmService.uploadFileOne(file);
return R.ok().put("data",filePath); return R.ok().put("data", filePath);
} catch (Exception e) { } catch (Exception e) {
return R.error(e.getLocalizedMessage()); return R.error(e.getLocalizedMessage());
} }
...@@ -233,11 +235,11 @@ public class TycpdmFirmController extends AbstractController { ...@@ -233,11 +235,11 @@ public class TycpdmFirmController extends AbstractController {
*/ */
@RequestMapping("/authApi/audit") @RequestMapping("/authApi/audit")
// @RequiresPermissions("manage:tycpdmfirm:delete") // @RequiresPermissions("manage:tycpdmfirm:delete")
public R audit(@RequestBody Map map){ public R audit(@RequestBody Map map) {
MemberEntity memberUser = getMemberUser(); MemberEntity memberUser = getMemberUser();
Long memberUserId = getMemberUserId(); Long memberUserId = getMemberUserId();
try { try {
tycpdmFirmService.audit(map,memberUserId,memberUser.getUsername()); tycpdmFirmService.audit(map, memberUserId, memberUser.getUsername());
} catch (InvocationTargetException e) { } catch (InvocationTargetException e) {
e.printStackTrace(); e.printStackTrace();
} catch (IllegalAccessException e) { } catch (IllegalAccessException e) {
...@@ -253,28 +255,26 @@ public class TycpdmFirmController extends AbstractController { ...@@ -253,28 +255,26 @@ public class TycpdmFirmController extends AbstractController {
*/ */
@RequestMapping("/api/returnFile") @RequestMapping("/api/returnFile")
@Login @Login
public R returnFile(@RequestParam Map<String, Object> params, HttpServletResponse response){ public R returnFile(@RequestParam Map<String, Object> params, HttpServletResponse response) {
tycpdmFirmService.returnFile(params,response); tycpdmFirmService.returnFile(params, response);
return R.ok(); return R.ok();
} }
/** /**
* 返回文件 url * 返回文件 url
*/ */
@RequestMapping("/authApi/returnFileUrl") @RequestMapping("/authApi/returnFileUrl")
public R returnFileUrl(@RequestBody Map name){ public R returnFileUrl(@RequestBody Map name) {
String url = tycpdmFirmService.returnFileUrl(name); String url = tycpdmFirmService.returnFileUrl(name);
return R.ok().put("data",url); return R.ok().put("data", url);
} }
/** /**
* 切换分中心管理员 * 切换分中心管理员
*/ */
@RequestMapping("/authApi/updateSystem") @RequestMapping("/authApi/updateSystem")
public R updateSystem(@RequestBody Map<String, Object> params){ public R updateSystem(@RequestBody Map<String, Object> params) {
tycpdmFirmService.updateSystem(params); tycpdmFirmService.updateSystem(params);
return R.ok(); return R.ok();
} }
...@@ -283,16 +283,16 @@ public class TycpdmFirmController extends AbstractController { ...@@ -283,16 +283,16 @@ public class TycpdmFirmController extends AbstractController {
* 跳转GDS页面 * 跳转GDS页面
*/ */
@RequestMapping("/authApi/redirectGDS") @RequestMapping("/authApi/redirectGDS")
public R redirectGDS(@RequestBody Map<String, Object> params,HttpServletResponse response){ public R redirectGDS(@RequestBody Map<String, Object> params, HttpServletResponse response) {
//由于member表中没有手机用户的信息 通过memberDao获取 //由于member表中没有手机用户的信息 通过memberDao获取
Object id = params.get("id"); Object id = params.get("id");
MemberEntity memberEntity=null; MemberEntity memberEntity = null;
if (id!=null){ if (id != null) {
memberEntity = memberDao.selectById(Long.valueOf(id+"")); memberEntity = memberDao.selectById(Long.valueOf(id + ""));
} }
String url= tycpdmFirmService.redirectGDSURL(memberEntity,params); String url = tycpdmFirmService.redirectGDSURL(memberEntity, params);
try { try {
return R.ok().put("data",url); return R.ok().put("data", url);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return R.error("跳转失败"); return R.error("跳转失败");
...@@ -304,11 +304,11 @@ public class TycpdmFirmController extends AbstractController { ...@@ -304,11 +304,11 @@ public class TycpdmFirmController extends AbstractController {
* 跳转GLN页面 * 跳转GLN页面
*/ */
@RequestMapping("/authApi/redirectGLN") @RequestMapping("/authApi/redirectGLN")
public R redirectGLN(HttpServletResponse response){ public R redirectGLN(HttpServletResponse response) {
MemberEntity memberUser = getMemberUser(); MemberEntity memberUser = getMemberUser();
String url= tycpdmFirmService.redirectGDSGLN(memberUser); String url = tycpdmFirmService.redirectGDSGLN(memberUser);
try { try {
return R.ok().put("data",url); return R.ok().put("data", url);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return R.error("跳转失败"); return R.error("跳转失败");
...@@ -321,23 +321,24 @@ public class TycpdmFirmController extends AbstractController { ...@@ -321,23 +321,24 @@ public class TycpdmFirmController extends AbstractController {
* 跳转业务大厅页面 * 跳转业务大厅页面
*/ */
@RequestMapping("/authApi/redirectBusinessHall") @RequestMapping("/authApi/redirectBusinessHall")
public R redirectBusinessHall(String id,String userType,HttpServletResponse response){ public R redirectBusinessHall(String id, String userType, HttpServletResponse response) {
//由于member表中没有手机用户的信息 通过memberDao获取 //由于member表中没有手机用户的信息 通过memberDao获取
Map<String,Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
params.put("id",id); params.put("id", id);
params.put("userType",userType); params.put("userType", userType);
/*MemberEntity memberEntity = memberDao.selectById(Long.valueOf(id.toString())); /*MemberEntity memberEntity = memberDao.selectById(Long.valueOf(id.toString()));
if (memberEntity==null){ if (memberEntity==null){
memberEntity=new MemberEntity(); memberEntity=new MemberEntity();
}*/ }*/
MemberEntity memberEntity = getMemberUser();
String url= tycpdmFirmService.redirectBusinessHall(params,memberEntity);
try { try {
MemberEntity memberEntity = getMemberUser();
String url = tycpdmFirmService.redirectBusinessHall(params, memberEntity);
//response.sendRedirect(url); //response.sendRedirect(url);
return R.ok().put("data",url); return R.ok().put("data", url);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return R.error("跳转失败"); return R.error("服务器繁忙!");
} }
} }
...@@ -346,10 +347,10 @@ public class TycpdmFirmController extends AbstractController { ...@@ -346,10 +347,10 @@ public class TycpdmFirmController extends AbstractController {
* 修改企业信息回显(不需要审批) * 修改企业信息回显(不需要审批)
*/ */
@RequestMapping("/authApi/findByUserName") @RequestMapping("/authApi/findByUserName")
public R findByUserName(@RequestBody Map name){ public R findByUserName(@RequestBody Map name) {
String userNameR = String.valueOf(name.get("name")); String userNameR = String.valueOf(name.get("name"));
TycpdmFirmEntity userName = tycpdmFirmDao.findUserName(userNameR); TycpdmFirmEntity userName = tycpdmFirmDao.findUserName(userNameR);
return R.ok().put("data",userName); return R.ok().put("data", userName);
} }
/** /**
...@@ -357,9 +358,9 @@ public class TycpdmFirmController extends AbstractController { ...@@ -357,9 +358,9 @@ public class TycpdmFirmController extends AbstractController {
*/ */
@RequestMapping("/api/findFirmInfoXT") @RequestMapping("/api/findFirmInfoXT")
@Login @Login
public R findFirmInfoXT(@RequestBody Map name){ public R findFirmInfoXT(@RequestBody Map name) {
String carno = String.valueOf(name.get("carno")); String carno = String.valueOf(name.get("carno"));
FirmEntity data = tycpdmFirmService.findFirmInfoXT(carno); FirmEntity data = tycpdmFirmService.findFirmInfoXT(carno);
return R.ok().put("data",data); return R.ok().put("data", data);
} }
} }
package io.office.modules.manage.service.impl; package io.office.modules.manage.service.impl;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import io.office.common.exception.RRException; import io.office.common.exception.RRException;
import io.office.common.utils.IPUtils; import io.office.common.utils.IPUtils;
import io.office.modules.manage.dao.*; import io.office.modules.manage.dao.*;
...@@ -25,10 +26,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -25,10 +26,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.utils.PageUtils; import io.office.common.utils.PageUtils;
import io.office.common.utils.Query; import io.office.common.utils.Query;
import io.office.modules.manage.service.MemberService; import io.office.modules.manage.service.MemberService;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@Service("memberService") @Service("memberService")
...@@ -163,6 +162,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl ...@@ -163,6 +162,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
throw new RRException("两次密码信息不一致,请重新输入"); throw new RRException("两次密码信息不一致,请重新输入");
} }
MemberEntity memberEntity = memberDao.selectById(id); MemberEntity memberEntity = memberDao.selectById(id);
if(memberEntity!=null) {
String passData = memberEntity.getPass(); String passData = memberEntity.getPass();
String passMD5 = MD5Util.md5Encrypt32Lower(oldPass); String passMD5 = MD5Util.md5Encrypt32Lower(oldPass);
if (!passMD5.equals(passData)) { if (!passMD5.equals(passData)) {
...@@ -172,6 +172,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl ...@@ -172,6 +172,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
memberDao.updateByIdPassWord(Long.valueOf(id), MD5Util.md5Encrypt32Lower(newPass)); memberDao.updateByIdPassWord(Long.valueOf(id), MD5Util.md5Encrypt32Lower(newPass));
} }
}
@Override @Override
public void updatephone(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) { public void updatephone(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) {
String ip = IPUtils.getIpAddr(request); String ip = IPUtils.getIpAddr(request);
...@@ -346,13 +348,18 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl ...@@ -346,13 +348,18 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
* @return * @return
*/ */
private static boolean matchPhoneNumber(String phoneNumber) { private static boolean matchPhoneNumber(String phoneNumber) {
String regex = "1[358][0-9]{9}"; String regex = "1[3456789][0-9]{9}";
if (phoneNumber == null || phoneNumber.length() <= 0) { if (phoneNumber == null || phoneNumber.length() <= 0) {
return false; return false;
} }
return Pattern.matches(regex, phoneNumber); return Pattern.matches(regex, phoneNumber);
} }
public static void main(String[] args) {
System.out.println(matchPhoneNumber("17368588652"));
}
@Override @Override
public String getVerificationCode(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) { public String getVerificationCode(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) {
//验证码随机6位数字(验证码) //验证码随机6位数字(验证码)
......
...@@ -76,7 +76,7 @@ public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, Time ...@@ -76,7 +76,7 @@ public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, Time
* @return * @return
*/ */
private static boolean matchPhoneNumber(String phoneNumber) { private static boolean matchPhoneNumber(String phoneNumber) {
String regex = "1[358][0-9]{9}"; String regex = "1[3456789][0-9]{9}";
if(phoneNumber==null||phoneNumber.length()<=0){ if(phoneNumber==null||phoneNumber.length()<=0){
return false; return false;
} }
...@@ -84,14 +84,7 @@ public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, Time ...@@ -84,14 +84,7 @@ public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, Time
} }
public static void main(String[] args) { public static void main(String[] args) {
long l = System.currentTimeMillis(); System.out.println(matchPhoneNumber("17368588652"));
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
long l2 = System.currentTimeMillis();
System.out.println((l2-l)/1000+"秒");
} }
@Override @Override
......
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