Browse Source

20210421v1.0

recovery
zy_Java 4 years ago
parent
commit
7c820d56cb
  1. 3
      cloudutil/src/main/resources/application-util-greenvalley.yml
  2. 28
      tall/src/main/java/com/ccsens/tall/service/UserService.java
  3. 23
      tall/src/main/resources/application-greenvalley.yml
  4. 4
      tall/src/main/resources/application.yml
  5. 7
      tall/src/main/resources/druid-greenvalley.yml
  6. 5
      tall/src/main/resources/mapper_dao/ProRoleDao.xml

3
cloudutil/src/main/resources/application-util-greenvalley.yml

@ -19,7 +19,8 @@ eureka:
client:
service-url:
# 指定eureka server通信地址,注意/eureka/小尾巴不能少
defaultZone: http://admin:admin@82.156.116.247:7010/eureka/
# defaultZone: http://admin:admin@82.156.116.247:7010/eureka/
defaultZone: http://admin:admin@49.232.6.143:7010/eureka/
instance:
# 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server
prefer-ip-address: true

28
tall/src/main/java/com/ccsens/tall/service/UserService.java

@ -536,16 +536,16 @@ public class UserService implements IUserService {
auth.setIdentifier(identifier);
auth.setCredential(credential);
authDao.insertSelective(auth);
// //自动添加账号密码
// String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR);
// SysAuth accountAuth = new SysAuth();
// accountAuth.setId(snowflake.nextId());
// accountAuth.setUserId(user.getId());
// accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value);
// accountAuth.setIdentifier("USER_" + accountName);
// accountAuth.setSalt(ShiroKit.getRandomSalt(6));
// accountAuth.setCredential(ShiroKit.md5("123456", accountAuth.getSalt()));
// authDao.insertSelective(accountAuth);
//自动添加账号密码
String accountName = RandomStringUtils.random(8, WebConstant.RANDOM_STR);
SysAuth accountAuth = new SysAuth();
accountAuth.setId(snowflake.nextId());
accountAuth.setUserId(user.getId());
accountAuth.setIdentifyType((byte) WebConstant.IDENTIFY_TYPE.Account.value);
accountAuth.setIdentifier("USER_" + accountName);
accountAuth.setSalt(ShiroKit.getRandomSalt(6));
accountAuth.setCredential(ShiroKit.md5("123456", accountAuth.getSalt()));
authDao.insertSelective(accountAuth);
return auth;
}
@ -763,8 +763,14 @@ public class UserService implements IUserService {
//将用户的昵称和头像复制到成员信息内
member.setAvatarUrl(user.getAvatarUrl());
member.setNickname(user.getNickname());
memberDao.updateByPrimaryKeySelective(member);
//用户关注这个项目
UserAttention attention = new UserAttention();
attention.setId(snowflake.nextId());
attention.setUserId(userId);
attention.setProjectId(member.getProjectId());
userAttentionDao.insertSelective(attention);
}
}
}

23
tall/src/main/resources/application-greenvalley.yml

@ -12,9 +12,9 @@ spring:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 127.0.0.1
password: 111111
password: sd12345
port: 5672
username: admin
username: yu
redis:
database: 0
host: 127.0.0.1
@ -31,10 +31,17 @@ swagger:
enable: true
eureka:
instance:
ip-address: 82.156.116.247
gatewayUrl: http://82.156.116.247 /gateway/
notGatewayUrl: http://82.156.116.247 /
smsCode: 1
# ip-address: 82.156.116.247
ip-address: 49.232.6.143
# 平台信息 0绿谷 1创时代
platforms: 1
file:
domain: http://82.156.116.247 /gateway/tall/v1.0/
imgDomain: http://82.156.116.247 /gateway/tall/v1.0/uploads
path: /home/wikiwiki/uploads/
domain: https://www.sxwikionline.com/gateway/wiki/
imgDomain: https://www.sxwikionline.com/gateway/wiki/uploads/upload/
#gatewayUrl: http://82.156.116.247 /gateway/
#notGatewayUrl: http://82.156.116.247 /
smsCode: 1

4
tall/src/main/resources/application.yml

@ -1,5 +1,5 @@
spring:
profiles:
active: test
include: util-test,common
active: dev
include: util-dev,common

7
tall/src/main/resources/druid-greenvalley.yml

@ -15,7 +15,8 @@ spring:
maxWait: 60000
minEvictableIdleTimeMillis: 300000
minIdle: 5
password: 6ba13d9930a6ad888a3704376c920a75
password:
# password: 6ba13d9930a6ad888a3704376c920a75
poolPreparedStatements: true
servletLogSlowSql: true
servletLoginPassword: 111111
@ -27,7 +28,7 @@ spring:
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://49.232.6.143:3306/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true
url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true
username: root
validationQuery: SELECT 1 FROM DUAL
env: CCSENS_GREENVALLEY
env: CCSENS_ENTERPRISE

5
tall/src/main/resources/mapper_dao/ProRoleDao.xml

@ -352,11 +352,14 @@
order by tpmrs.sequence
</select>
<select id="queryRoleShowslistBefore" resultType="com.ccsens.tall.bean.vo.RoleVo$JueSeByProId">
select id,name,sequence
select
id,name,sequence
from t_pro_role tpr
where tpr.rec_status=0
and tpr.project_id=#{param1}
and tpr.parent_id !=0
and (SELECT name FROM t_pro_role pr WHERE tpr.parent_id = pr.id) in ('PM','Member')
and tpr.name not IN('观众', 'MVP')
<if test="param2!=null and param2.size>0">
and tpr.id not in
<foreach collection="param2" item="id" separator="," open="(" close=")">

Loading…
Cancel
Save