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);
##文件夹内容上传 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;
import java.util.Arrays;
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.sys.controller.AbstractController;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -91,6 +94,9 @@ public class MemberController extends AbstractController {
// @RequiresPermissions("manage:member:info")
public R info(){
Long memberUserId = getMemberUserId();
/*
QueryWrapper<MemberEntity> queryWrapper = new QueryWrapper<MemberEntity>();
queryWrapper.eq("phone",memberUserId);*/
MemberEntity member = memberService.getById(memberUserId);
return R.ok().put("data", member);
......
......@@ -30,10 +30,10 @@ import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
/**
* ${comments}
* 企业认证信息
*
* @author wudi
* @email
* @date 2021-12-11 15:15:19
......@@ -50,7 +50,9 @@ public class TycpdmFirmController extends AbstractController {
private TycpdmFirmChangeService tycpdmFirmChangeService;
@Autowired
private MemberDao memberDao;
/* *//**
/* */
/**
* 列表
*//*
@RequestMapping("/api/list")
......@@ -66,18 +68,17 @@ public class TycpdmFirmController extends AbstractController {
return R.ok().put("data", page);
}*/
@RequestMapping("/api/test")
@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");
}
/**
* 列表
*/
@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,
new Page(Integer.valueOf(params.get("page").toString()),
Integer.valueOf(params.get("limit").toString())));
......@@ -91,7 +92,7 @@ public class TycpdmFirmController extends AbstractController {
*/
@RequestMapping("/info/{fId}")
// @RequiresPermissions("manage:tycpdmfirm:info")
public R info(@PathVariable("fId") Integer fId){
public R info(@PathVariable("fId") Integer fId) {
TycpdmFirmEntity tycpdmFirm = tycpdmFirmService.getById(fId);
return R.ok().put("tycpdmFirm", tycpdmFirm);
......@@ -99,6 +100,7 @@ public class TycpdmFirmController extends AbstractController {
/**
* 保存(保存企业信息) status 申请状态 1.新增 2.修改
*
* @param
* @param
* @return
......@@ -108,37 +110,37 @@ public class TycpdmFirmController extends AbstractController {
public R save(@RequestBody Map body) throws InvocationTargetException, IllegalAccessException {
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 {
/* String s = MD5Util.md5Encrypt32Upper("GS1_20201013");
System.out.println(s);*/
String pass="GS1_20201013";
String pass = "GS1_20201013";
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 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(pass_M);
}
/**
* 根据用户名获取企业认证信息
*/
@RequestMapping("/authApi/findUserName")
// @RequiresPermissions("manage:tycpdmfirm:save")
public R findUserName(@RequestParam("userName") String userName){
public R findUserName(@RequestParam("userName") String userName) {
//查询 业务类型 1.首次 2.变更
int logoutFlag=tycpdmFirmService.findLogoutFlag(userName);
JSONObject tycpdmFirmEntity=tycpdmFirmService.findUserName(logoutFlag,userName);
int logoutFlag = tycpdmFirmService.findLogoutFlag(userName);
JSONObject tycpdmFirmEntity = tycpdmFirmService.findUserName(logoutFlag, userName);
R ok = R.ok();
tycpdmFirmEntity.put("status",logoutFlag);
ok.put("data",tycpdmFirmEntity);
tycpdmFirmEntity.put("status", logoutFlag);
ok.put("data", tycpdmFirmEntity);
return ok;
}
......@@ -147,7 +149,7 @@ public class TycpdmFirmController extends AbstractController {
*/
@RequestMapping("/authApi/update")
// @RequiresPermissions("manage:tycpdmfirm:update")
public R update(@RequestBody Map body){
public R update(@RequestBody Map body) {
TycpdmFirmEntity tycpdmFirm = new TycpdmFirmEntity();
try {
BeanUtils.populate(tycpdmFirm, body);
......@@ -166,7 +168,7 @@ public class TycpdmFirmController extends AbstractController {
*/
@RequestMapping("/delete")
// @RequiresPermissions("manage:tycpdmfirm:delete")
public R delete(@RequestBody Integer[] fIds){
public R delete(@RequestBody Integer[] fIds) {
tycpdmFirmService.removeByIds(Arrays.asList(fIds));
return R.ok();
......@@ -178,7 +180,7 @@ public class TycpdmFirmController extends AbstractController {
*/
@RequestMapping("/authApi/findTycpdmFirmLogoutFlagCount")
// @RequiresPermissions("manage:tycpdmfirm:delete")
public R findTycpdmFirmLogoutFlagCount(){
public R findTycpdmFirmLogoutFlagCount() {
/*Integer id=getMemberUserId().intValue();
if(id==null){
return R.error("用户信息有误");
......@@ -186,8 +188,8 @@ public class TycpdmFirmController extends AbstractController {
MemberEntity userMember = getMemberUser();*/
MemberEntity memberUser = getMemberUser();
Map<String,Integer> map=tycpdmFirmService.findTycpdmFirmLogoutFlagCount(memberUser);
return R.ok().put("data",map);
Map<String, Integer> map = tycpdmFirmService.findTycpdmFirmLogoutFlagCount(memberUser);
return R.ok().put("data", map);
}
/**
......@@ -195,15 +197,15 @@ public class TycpdmFirmController extends AbstractController {
*/
@RequestMapping("/authApi/uploadFile")
// @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 {
if (status==1){
tycpdmFirmService.uploadFile(file,id);
if (status == 1) {
tycpdmFirmService.uploadFile(file, id);
return R.ok();
}else if (status==2){
tycpdmFirmChangeService.uploadFile(file,id);
} else if (status == 2) {
tycpdmFirmChangeService.uploadFile(file, id);
return R.ok();
}else {
} else {
return R.error("请前端人员传递业务类型 变更过新增");
}
......@@ -218,10 +220,10 @@ public class TycpdmFirmController extends AbstractController {
@RequestMapping("/authApi/uploadFileOne")
// @RequiresPermissions("manage:tycpdmfirm:delete")
@Login
public R uploadFileOne(@RequestParam("file") MultipartFile file){
public R uploadFileOne(@RequestParam("file") MultipartFile file) {
try {
String filePath = tycpdmFirmService.uploadFileOne(file);
return R.ok().put("data",filePath);
return R.ok().put("data", filePath);
} catch (Exception e) {
return R.error(e.getLocalizedMessage());
}
......@@ -233,11 +235,11 @@ public class TycpdmFirmController extends AbstractController {
*/
@RequestMapping("/authApi/audit")
// @RequiresPermissions("manage:tycpdmfirm:delete")
public R audit(@RequestBody Map map){
public R audit(@RequestBody Map map) {
MemberEntity memberUser = getMemberUser();
Long memberUserId = getMemberUserId();
try {
tycpdmFirmService.audit(map,memberUserId,memberUser.getUsername());
tycpdmFirmService.audit(map, memberUserId, memberUser.getUsername());
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
......@@ -253,28 +255,26 @@ public class TycpdmFirmController extends AbstractController {
*/
@RequestMapping("/api/returnFile")
@Login
public R returnFile(@RequestParam Map<String, Object> params, HttpServletResponse response){
tycpdmFirmService.returnFile(params,response);
public R returnFile(@RequestParam Map<String, Object> params, HttpServletResponse response) {
tycpdmFirmService.returnFile(params, response);
return R.ok();
}
/**
* 返回文件 url
*/
@RequestMapping("/authApi/returnFileUrl")
public R returnFileUrl(@RequestBody Map name){
public R returnFileUrl(@RequestBody Map name) {
String url = tycpdmFirmService.returnFileUrl(name);
return R.ok().put("data",url);
return R.ok().put("data", url);
}
/**
* 切换分中心管理员
*/
@RequestMapping("/authApi/updateSystem")
public R updateSystem(@RequestBody Map<String, Object> params){
public R updateSystem(@RequestBody Map<String, Object> params) {
tycpdmFirmService.updateSystem(params);
return R.ok();
}
......@@ -283,16 +283,16 @@ public class TycpdmFirmController extends AbstractController {
* 跳转GDS页面
*/
@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获取
Object id = params.get("id");
MemberEntity memberEntity=null;
if (id!=null){
memberEntity = memberDao.selectById(Long.valueOf(id+""));
MemberEntity memberEntity = null;
if (id != null) {
memberEntity = memberDao.selectById(Long.valueOf(id + ""));
}
String url= tycpdmFirmService.redirectGDSURL(memberEntity,params);
String url = tycpdmFirmService.redirectGDSURL(memberEntity, params);
try {
return R.ok().put("data",url);
return R.ok().put("data", url);
} catch (Exception e) {
e.printStackTrace();
return R.error("跳转失败");
......@@ -304,11 +304,11 @@ public class TycpdmFirmController extends AbstractController {
* 跳转GLN页面
*/
@RequestMapping("/authApi/redirectGLN")
public R redirectGLN(HttpServletResponse response){
public R redirectGLN(HttpServletResponse response) {
MemberEntity memberUser = getMemberUser();
String url= tycpdmFirmService.redirectGDSGLN(memberUser);
String url = tycpdmFirmService.redirectGDSGLN(memberUser);
try {
return R.ok().put("data",url);
return R.ok().put("data", url);
} catch (Exception e) {
e.printStackTrace();
return R.error("跳转失败");
......@@ -321,23 +321,24 @@ public class TycpdmFirmController extends AbstractController {
* 跳转业务大厅页面
*/
@RequestMapping("/authApi/redirectBusinessHall")
public R redirectBusinessHall(String id,String userType,HttpServletResponse response){
public R redirectBusinessHall(String id, String userType, HttpServletResponse response) {
//由于member表中没有手机用户的信息 通过memberDao获取
Map<String,Object> params = new HashMap<>();
params.put("id",id);
params.put("userType",userType);
Map<String, Object> params = new HashMap<>();
params.put("id", id);
params.put("userType", userType);
/*MemberEntity memberEntity = memberDao.selectById(Long.valueOf(id.toString()));
if (memberEntity==null){
memberEntity=new MemberEntity();
}*/
MemberEntity memberEntity = getMemberUser();
String url= tycpdmFirmService.redirectBusinessHall(params,memberEntity);
try {
MemberEntity memberEntity = getMemberUser();
String url = tycpdmFirmService.redirectBusinessHall(params, memberEntity);
//response.sendRedirect(url);
return R.ok().put("data",url);
return R.ok().put("data", url);
} catch (Exception e) {
e.printStackTrace();
return R.error("跳转失败");
return R.error("服务器繁忙!");
}
}
......@@ -346,10 +347,10 @@ public class TycpdmFirmController extends AbstractController {
* 修改企业信息回显(不需要审批)
*/
@RequestMapping("/authApi/findByUserName")
public R findByUserName(@RequestBody Map name){
public R findByUserName(@RequestBody Map name) {
String userNameR = String.valueOf(name.get("name"));
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 {
*/
@RequestMapping("/api/findFirmInfoXT")
@Login
public R findFirmInfoXT(@RequestBody Map name){
public R findFirmInfoXT(@RequestBody Map name) {
String carno = String.valueOf(name.get("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;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import io.office.common.exception.RRException;
import io.office.common.utils.IPUtils;
import io.office.modules.manage.dao.*;
......@@ -25,10 +26,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.utils.PageUtils;
import io.office.common.utils.Query;
import io.office.modules.manage.service.MemberService;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@Service("memberService")
......@@ -163,6 +162,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
throw new RRException("两次密码信息不一致,请重新输入");
}
MemberEntity memberEntity = memberDao.selectById(id);
if(memberEntity!=null) {
String passData = memberEntity.getPass();
String passMD5 = MD5Util.md5Encrypt32Lower(oldPass);
if (!passMD5.equals(passData)) {
......@@ -172,6 +172,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
memberDao.updateByIdPassWord(Long.valueOf(id), MD5Util.md5Encrypt32Lower(newPass));
}
}
@Override
public void updatephone(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) {
String ip = IPUtils.getIpAddr(request);
......@@ -346,13 +348,18 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
* @return
*/
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) {
return false;
}
return Pattern.matches(regex, phoneNumber);
}
public static void main(String[] args) {
System.out.println(matchPhoneNumber("17368588652"));
}
@Override
public String getVerificationCode(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) {
//验证码随机6位数字(验证码)
......
......@@ -76,7 +76,7 @@ public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, Time
* @return
*/
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){
return false;
}
......@@ -84,14 +84,7 @@ public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, Time
}
public static void main(String[] args) {
long l = System.currentTimeMillis();
try {
Thread.sleep(3000);
} catch (InterruptedException e) {
e.printStackTrace();
}
long l2 = System.currentTimeMillis();
System.out.println((l2-l)/1000+"秒");
System.out.println(matchPhoneNumber("17368588652"));
}
@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