Commit 778a7cc6 by wang_jiaxing

关闭swagger,完善修改密码接口

parent d2ed94b6
...@@ -4,6 +4,7 @@ package org.springblade.founder.redis.controller; ...@@ -4,6 +4,7 @@ package org.springblade.founder.redis.controller;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.serializer.SerializerFeature; import com.alibaba.fastjson.serializer.SerializerFeature;
import com.baomidou.dynamic.datasource.annotation.DS;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springblade.founder.redis.service.IDicItemService; import org.springblade.founder.redis.service.IDicItemService;
...@@ -24,6 +25,7 @@ import java.util.*; ...@@ -24,6 +25,7 @@ import java.util.*;
@Controller @Controller
@Api(tags = "字典码相关接口") @Api(tags = "字典码相关接口")
@DS("db1")
public class DictitemController { public class DictitemController {
@Autowired @Autowired
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
startcode, startcode,
endcode endcode
from sys_dictitem from sys_dictitem
where scbz = '0' where scbz = 0
<if test="value != null"> <if test="value != null">
and groupid=#{value, jdbcType=VARCHAR} and groupid=#{value, jdbcType=VARCHAR}
</if> </if>
......
...@@ -33,6 +33,7 @@ public interface SysUserMapper { ...@@ -33,6 +33,7 @@ public interface SysUserMapper {
// 根据id查询用户 信息 // 根据id查询用户 信息
SysNewUser getUserByBh(String id) throws Exception ; SysNewUser getUserByBh(String id) throws Exception ;
SysNewUser getUserByZjhm(String zjhm) throws Exception ;
//删除用户信息 //删除用户信息
void deleteUserNew(SysNewUser sysNewUser)throws Exception; void deleteUserNew(SysNewUser sysNewUser)throws Exception;
......
...@@ -470,5 +470,49 @@ ...@@ -470,5 +470,49 @@
#{id,jdbcType=VARCHAR} #{id,jdbcType=VARCHAR}
</foreach> </foreach>
</select> </select>
<select id="getUserByZjhm" resultType="org.springblade.modules.system.entity.SysNewUser">
SELECT
id as id,
unitcode as unitcode,
username as username,
password as password,
true_name as trueName,
open_flag as openFlag,
default_model as defaultModel,
remark as remark,
lrr as lrr,
lrsj as lrsj,
gxr as gxr,
gxsj as gxsj,
lrdwdm as lrdwdm,
lrdwmc as lrdwmc,
identitycard as identitycard,
sex as sex,
birthday as birthday,
telephone as telephone,
unitname as unitname,
scbz as scbz,
ip as ip,
grade as grade,
policemanid as policemanid,
default_desktop as defaultDesktop,
theme as theme,
lastlogintime as lastlogintime,
lastchecktime as lastchecktime,
xxzyurl as xxzyurl,
gzzm_zhy as gzzmZhy,
gzzm_ypy as gzzmYpy,
gzzm_zcy as gzzmZcy,
gzzm_play as gzzmPlay,
glybz as glybz,
tqyhbz as tqyhbz,
jgz_photo_zm as jgzPhotoZm,
jgz_photo_fm as jgzPhotoFm,
zbzx_dwdm as zbzxDwdm,
grdf as grdf
FROM sys_user
where scbz='0' and IDENTITYCARD=#{ zjhm , jdbcType=VARCHAR }
</select>
</mapper> </mapper>
...@@ -26,11 +26,9 @@ import org.apache.commons.lang.StringUtils; ...@@ -26,11 +26,9 @@ import org.apache.commons.lang.StringUtils;
import org.springblade.common.constant.CommonConstant; import org.springblade.common.constant.CommonConstant;
import org.springblade.core.log.exception.ServiceException; import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.base.BaseServiceImpl; import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.secure.utils.SecureUtil;
import org.springblade.core.tool.utils.*; import org.springblade.core.tool.utils.*;
import org.springblade.modules.system.entity.SysNewUser; import org.springblade.modules.system.entity.*;
import org.springblade.modules.system.entity.User;
import org.springblade.modules.system.entity.UserInfo;
import org.springblade.modules.system.entity.UserInfoResult;
import org.springblade.modules.system.excel.UserExcel; import org.springblade.modules.system.excel.UserExcel;
import org.springblade.modules.system.mapper.SysUserMapper; import org.springblade.modules.system.mapper.SysUserMapper;
import org.springblade.modules.system.mapper.UserMapper; import org.springblade.modules.system.mapper.UserMapper;
...@@ -284,9 +282,8 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement ...@@ -284,9 +282,8 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
@Override @Override
@DS("db1") @DS("db1")
public String updatePassword(String userId, String oldPassword, String newPassword, String newPassword1) { public String updatePassword(String userId, String oldPassword, String newPassword, String newPassword1) {
if (StringUtils.isEmpty(userId)){ XzxtUser userXzxt = SecureUtil.getUserXzxt();
return "202#用户id不能为空"; userId = userXzxt.getIdentitycard();
}
if (StringUtils.isEmpty(newPassword) || !newPassword.equals(newPassword1)){ if (StringUtils.isEmpty(newPassword) || !newPassword.equals(newPassword1)){
if (StringUtils.isEmpty(newPassword)){ if (StringUtils.isEmpty(newPassword)){
return "201#新密码不能为空"; return "201#新密码不能为空";
...@@ -297,9 +294,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement ...@@ -297,9 +294,9 @@ public class UserServiceImpl extends BaseServiceImpl<UserMapper, User> implement
return "201#原密码不能为空"; return "201#原密码不能为空";
} }
try { try {
SysNewUser user = sysUserMapper.getUserByBh(userId); SysNewUser user = sysUserMapper.getUserByZjhm(userId);
if (user == null){ if (user == null){
return "202#用户id有误"; return "202#用户不存在";
} }
if (!DigestUtil.encrypt(oldPassword).equals(user.getPassword())){ if (!DigestUtil.encrypt(oldPassword).equals(user.getPassword())){
return "201#原密码错误"; return "201#原密码错误";
......
#数据源配置 #数据源配置
jasypt: jasypt:
encryptor: encryptor:
algorithm: PBEWithMD5AndDES #加密算法设置 algorithm: PBEWithMD5AndDES
iv-generator-classname: org.jasypt.iv.NoIvGenerator iv-generator-classname: org.jasypt.iv.NoIvGenerator
password: ${XZXT_REPORT} password: ${XZXT_REPORT}
spring: spring:
redis: redis:
##redis 单机环境配置 ##redis 单机环境配置
host: 127.0.0.1 host: 127.0.0.1
port: 6379 port: 6379
password: password:
database: 0 database: 0
ssl: false ssl: false
# host: 74.6.54.152 # host: 74.6.54.152
# port: 6378 # port: 6378
# database: 0 # database: 0
...@@ -34,29 +34,29 @@ spring: ...@@ -34,29 +34,29 @@ spring:
datasource: datasource:
xzxt_hn: #海南 xzxt_hn: #海南
# url: jdbc:oracle:thin:@10.184.17.3:1521:HNXZXT1 # url: jdbc:oracle:thin:@10.184.17.3:1521:HNXZXT1
# username: ENC(ZA4vXCX7GUMt7x/QBlw0zA==) # username: ENC(flDmWJqmJgLHFuetYy4x/A==)
# password: ENC(n4QiQMv5+CsHg6VfmTbQbwR2kIuYmSdh) # password: ENC(RZWfCneQ+BFU3cZjsMTIFwU4SEajqARk)
url: jdbc:oracle:thin:@47.92.129.99:1560:orcl url: jdbc:oracle:thin:@47.92.129.99:1560:orcl
username: ENC(+ZmqDtfuX3L1I+zDRNce9Q==) username: ENC(2gWv/+Q7eVC8/xCQchQFrA==)
password: ENC(ZLVz8DkDpIwf1dgWDhqlVmBFIIeppbFf) password: ENC(pg5ZP+70jL/w3c/dIfeSZ2tTB036zzax)
driver-class-name: oracle.jdbc.driver.OracleDriver driver-class-name: oracle.jdbc.driver.OracleDriver
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
xzxt_qg: #全国 xzxt_qg: #全国
# url: jdbc:oracle:thin:@10.2.164.176:1521:xzdb176 # url: jdbc:oracle:thin:@10.2.164.176:1521:xzdb176
# username: ENC(rhch4Tdkraizcu3DPslYDQ==) # username: ENC(hH+fdRs4XMMLNGuZQIqA/w==)
# password: ENC(h7T0jwvNnrg7TfAcZGNG0w==) # password: ENC(AbQityqdwHeQfel3fZ1giQ==)
url: jdbc:oracle:thin:@47.92.129.99:1560:orcl url: jdbc:oracle:thin:@47.92.129.99:1560:orcl
username: ENC(XWCKFrkmFuVEknh9I5KUSQ==) username: ENC(UiOtXwkiqow2VejTbYSEJQ==)
password: ENC(g9N5euxMDNx4YXfDNgxV4QrBW+LbkGQ8) password: ENC(an9nyUTLI4x6R2zRsBltE5h/PpCeg0vm)
driver-class-name: oracle.jdbc.driver.OracleDriver driver-class-name: oracle.jdbc.driver.OracleDriver
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
db1: #mysql库 db1: #mysql库
# url: jdbc:mysql://74.10.26.176:4606/xzxt?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 # url: jdbc:mysql://74.10.26.176:4606/xzxt?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
# username: ENC(dOoA6OdNK03dX2IdPCf0mw==) # username: ENC(tVZxpXBDil7lvQE9sSEgtA==)
# password: ENC(WoPhZ9arQ5SqplS1gTJ1e1LOTaV/sft3) # password: ENC(RlI0E2e8nLeVM+816Fvatil3DSc4n9kJ)
url: jdbc:mysql://47.92.223.200:3365/xzxt?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 url: jdbc:mysql://47.92.223.200:3365/xzxt?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8
username: ENC(AoAI1r/5PcFBDEs0ZFIBVA==) username: ENC(bCkMoJvvHsZlKG4TX+gkJA==)
password: ENC(UVE9IyOE8vTAG2UdiKMtBA==) password: ENC(S7+oYHAxpYOgrvbb+cfb5w==)
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
...@@ -119,6 +119,8 @@ socketIoUrl: http://74.6.54.153:9022/sendMassage ...@@ -119,6 +119,8 @@ socketIoUrl: http://74.6.54.153:9022/sendMassage
bbgxfjPath: /Users/lystar/Software/fileupload/fileupload bbgxfjPath: /Users/lystar/Software/fileupload/fileupload
rxhczpPath: /Users/lystar/Software/fileupload/rxhczp rxhczpPath: /Users/lystar/Software/fileupload/rxhczp
#bbgxfjPath: /data/software/file/bbgx
#rxhczpPath: /data/software/file/rxhczp
qgEs: qgEs:
url: http://74.6.54.172:9061/xxcx/ url: http://74.6.54.172:9061/xxcx/
......
...@@ -80,6 +80,7 @@ knife4j: ...@@ -80,6 +80,7 @@ knife4j:
enableFilterMultipartApis: false enableFilterMultipartApis: false
enableFilterMultipartApiMethodType: POST enableFilterMultipartApiMethodType: POST
language: zh-CN language: zh-CN
production: true
#swagger配置信息 #swagger配置信息
swagger: swagger:
title: ma系统 接口文档系统 title: ma系统 接口文档系统
......
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