修改 Graylog 分布式日志框架
This commit is contained in:
		@@ -18,7 +18,7 @@ import javax.annotation.Resource;
 | 
			
		||||
 * @author yovinchen
 | 
			
		||||
 * @Create 2023/9/25 12:23
 | 
			
		||||
 */
 | 
			
		||||
@Api(tags = "团长接口")
 | 
			
		||||
@Api(tags = "配送员接口")
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("api/user/leader")
 | 
			
		||||
public class LeaderAddressController {
 | 
			
		||||
 
 | 
			
		||||
@@ -77,9 +77,9 @@ public class LoginWxService {
 | 
			
		||||
            userService.save(user);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        //5 根据userId查询提货点和团长信息
 | 
			
		||||
        //5 根据userId查询提货点和配送员信息
 | 
			
		||||
        ////提货点  user表  user_delivery表
 | 
			
		||||
        ////团长    leader表
 | 
			
		||||
        ////配送员    leader表
 | 
			
		||||
        LeaderAddressVo leaderAddressVo = userService.getLeaderAddressByUserId(user.getId());
 | 
			
		||||
 | 
			
		||||
        //6 使用JWT工具根据userId和userName生成token字符串
 | 
			
		||||
 
 | 
			
		||||
@@ -22,7 +22,7 @@ public interface UserService extends IService<User> {
 | 
			
		||||
    User getUserByOpenId(String openid);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 根据userId查询提货点和团长信息
 | 
			
		||||
     * 根据userId查询提货点和配送员信息
 | 
			
		||||
     *
 | 
			
		||||
     * @param id
 | 
			
		||||
     * @return
 | 
			
		||||
 
 | 
			
		||||
@@ -38,16 +38,16 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
 | 
			
		||||
        return user;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //5 根据userId查询提货点和团长信息
 | 
			
		||||
    //5 根据userId查询提货点和配送员信息
 | 
			
		||||
    @Override
 | 
			
		||||
    public LeaderAddressVo getLeaderAddressByUserId(Long userId) {
 | 
			
		||||
        //根据userId查询用户默认的团长id
 | 
			
		||||
        //根据userId查询用户默认的配送员id
 | 
			
		||||
        UserDelivery userDelivery = userDeliveryMapper.selectOne(new LambdaQueryWrapper<UserDelivery>().eq(UserDelivery::getUserId, userId)
 | 
			
		||||
                                                                                                       .eq(UserDelivery::getIsDefault, 1));
 | 
			
		||||
        if (userDelivery == null) {
 | 
			
		||||
            return null;
 | 
			
		||||
        }
 | 
			
		||||
        //拿着上面查询团长id查询leader表查询团长其他信息
 | 
			
		||||
        //拿着上面查询配送员id查询leader表查询配送员其他信息
 | 
			
		||||
        Leader leader = leaderMapper.selectById(userDelivery.getLeaderId());
 | 
			
		||||
        //封装数据到LeaderAddressVo
 | 
			
		||||
        LeaderAddressVo leaderAddressVo = new LeaderAddressVo();
 | 
			
		||||
 
 | 
			
		||||
@@ -85,7 +85,8 @@
 | 
			
		||||
    <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
 | 
			
		||||
        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
 | 
			
		||||
            <!--设置文件命名格式-->
 | 
			
		||||
            <FileNamePattern>${LOG_HOME}/${APP_NAME}/info/${APP_NAME}-%d{yyyy-MM-dd}-%i.log</FileNamePattern>
 | 
			
		||||
<!--            <FileNamePattern>${LOG_HOME}/${APP_NAME}/error/${POD_NAME}-%d{yyyy-MM-dd}-%i.log</FileNamePattern>-->
 | 
			
		||||
            <FileNamePattern>${LOG_HOME}/${APP_NAME}/error/${APP_NAME}-%d{yyyy-MM-dd}-%i.log</FileNamePattern>
 | 
			
		||||
            <!--设置日志文件大小,超过就重新生成文件,默认10M-->
 | 
			
		||||
            <maxFileSize>${LOG_FILE_MAX_SIZE}</maxFileSize>
 | 
			
		||||
            <!--日志文件保留天数,默认30天-->
 | 
			
		||||
@@ -140,7 +141,7 @@
 | 
			
		||||
    </logger>
 | 
			
		||||
    <appender name="GELF" class="biz.paluch.logging.gelf.logback.GelfLogbackAppender">
 | 
			
		||||
        <!--GrayLog服务地址-->
 | 
			
		||||
        <host>udp:124.70.87.134</host>
 | 
			
		||||
        <host>udp:10.211.55.50</host>
 | 
			
		||||
        <!--GrayLog服务端口-->
 | 
			
		||||
        <port>12201</port>
 | 
			
		||||
        <version>1.1</version>
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user