no message
							parent
							
								
									710a83d962
								
							
						
					
					
						commit
						3fca9c0b45
					
				| 
						 | 
				
			
			@ -8,7 +8,7 @@ import VueRouter from "vue-router";
 | 
			
		|||
import router from "@/router/router";
 | 
			
		||||
import store from "@/store/store";
 | 
			
		||||
Vue.prototype.$axios=axios;
 | 
			
		||||
Vue.prototype.$httpUrl='http://192.168.56.147:8081';
 | 
			
		||||
Vue.prototype.$httpUrl='http://192.168.56.138:8081';
 | 
			
		||||
Vue.config.productionTip = false;
 | 
			
		||||
Vue.use(VueRouter)
 | 
			
		||||
Vue.use(ElementUI,{size:'small'});
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,10 +1,15 @@
 | 
			
		|||
package com.yc.wms.controller;
 | 
			
		||||
 | 
			
		||||
import com.yc.wms.model.MQTTResult;
 | 
			
		||||
import lombok.extern.slf4j.Slf4j;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import com.yc.wms.model.User;
 | 
			
		||||
import com.yc.wms.until.Result;
 | 
			
		||||
import org.springframework.beans.factory.annotation.Autowired;
 | 
			
		||||
import org.springframework.web.bind.annotation.RequestMapping;
 | 
			
		||||
 | 
			
		||||
import org.springframework.web.bind.annotation.RestController;
 | 
			
		||||
import org.springframework.http.HttpStatus;
 | 
			
		||||
import org.springframework.http.ResponseEntity;
 | 
			
		||||
import org.springframework.web.bind.annotation.*;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * <p>
 | 
			
		||||
| 
						 | 
				
			
			@ -14,15 +19,21 @@ import org.springframework.web.bind.annotation.RestController;
 | 
			
		|||
 * @author wms
 | 
			
		||||
 * @since 2023-07-07
 | 
			
		||||
 */
 | 
			
		||||
@Slf4j
 | 
			
		||||
@RestController
 | 
			
		||||
@RequestMapping("/menu")
 | 
			
		||||
public class MenuController {
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    /**
 | 
			
		||||
     * 查询菜单
 | 
			
		||||
     * @param roleId
 | 
			
		||||
     * @return
 | 
			
		||||
     */
 | 
			
		||||
    @PostMapping("/login")
 | 
			
		||||
    public ResponseEntity<Object> login(@RequestBody User user) {
 | 
			
		||||
        System.out.println(""+user.username+"/"+user.password);
 | 
			
		||||
        log.error(""+user.username+"/"+user.password);
 | 
			
		||||
        //{
 | 
			
		||||
        //    "result": "allow" | "deny" | "ignore", // Default `"ignore"`
 | 
			
		||||
        //    "is_superuser": true | false // Default `false`
 | 
			
		||||
        //}
 | 
			
		||||
        MQTTResult mqttResult=new MQTTResult();
 | 
			
		||||
        return new ResponseEntity(mqttResult, HttpStatus.OK);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
package com.yc.wms.model;
 | 
			
		||||
 | 
			
		||||
public class MQTTResult {
 | 
			
		||||
    public String result="allow";  // "result": "allow" | "deny" | "ignore", // Default `"ignore"`
 | 
			
		||||
    public boolean is_superuser=true;//    "is_superuser": true | false // Default `false`
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,7 @@
 | 
			
		|||
package com.yc.wms.model;
 | 
			
		||||
 | 
			
		||||
public class User {
 | 
			
		||||
    public String username;
 | 
			
		||||
    public String password;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -1,25 +0,0 @@
 | 
			
		|||
package com.yc.wms.until;
 | 
			
		||||
 | 
			
		||||
import com.baomidou.mybatisplus.annotation.DbType;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
 | 
			
		||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
 | 
			
		||||
import org.mybatis.spring.annotation.MapperScan;
 | 
			
		||||
import org.springframework.context.annotation.Bean;
 | 
			
		||||
import org.springframework.context.annotation.Configuration;
 | 
			
		||||
 | 
			
		||||
@Configuration
 | 
			
		||||
@MapperScan("com.yc.wms.mapper")
 | 
			
		||||
public class MybatisPlusConfig {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 新的分页插件,一缓和二缓遵循mybatis的规则,需要设置 MybatisConfiguration#useDeprecatedExecutor = false 避免缓存出现问题(该属性会在旧插件移除后一同移除)
 | 
			
		||||
     */
 | 
			
		||||
    @Bean
 | 
			
		||||
    public MybatisPlusInterceptor mybatisPlusInterceptor() {
 | 
			
		||||
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
 | 
			
		||||
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
 | 
			
		||||
        return interceptor;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue