1、key使用阿里用户表获取
							parent
							
								
									af003ea3cf
								
							
						
					
					
						commit
						d6809e34f5
					
				| @ -0,0 +1,9 @@ | ||||
| package com.glxp.api.dao.auth; | ||||
| 
 | ||||
| import com.glxp.api.dao.BaseMapperPlus; | ||||
| import com.glxp.api.entity.auth.AuthAliUser; | ||||
| import com.glxp.api.entity.auth.InvSpace; | ||||
| 
 | ||||
| public interface AuthAliUserDao extends BaseMapperPlus<AuthAliUser, AuthAliUser, AuthAliUser> { | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,37 @@ | ||||
| package com.glxp.api.entity.auth; | ||||
| 
 | ||||
| import lombok.AllArgsConstructor; | ||||
| import lombok.Data; | ||||
| import lombok.NoArgsConstructor; | ||||
| 
 | ||||
| @Data | ||||
| @AllArgsConstructor | ||||
| @NoArgsConstructor | ||||
| public class AuthAliUser { | ||||
|     private Long id; | ||||
| 
 | ||||
|     /** | ||||
|      * 第三方ID | ||||
|      */ | ||||
|     private String erpid; | ||||
| 
 | ||||
|     /** | ||||
|      * 阿里KEY | ||||
|      */ | ||||
|     private String appkey; | ||||
| 
 | ||||
|     /** | ||||
|      * 阿里密钥 | ||||
|      */ | ||||
|     private String appsecret; | ||||
| 
 | ||||
|     /** | ||||
|      * 厂家标识 | ||||
|      */ | ||||
|     private String refentid; | ||||
| 
 | ||||
|     /** | ||||
|      * 1 为生成企业 2为零售药店 | ||||
|      */ | ||||
|     private String type; | ||||
| } | ||||
| @ -0,0 +1,26 @@ | ||||
| package com.glxp.api.service.auth; | ||||
| 
 | ||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||
| import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | ||||
| import com.glxp.api.dao.auth.AuthAliUserDao; | ||||
| import com.glxp.api.entity.auth.AuthAliUser; | ||||
| import com.glxp.api.entity.auth.SysWorkplace; | ||||
| import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| import javax.annotation.Resource; | ||||
| 
 | ||||
| @Service | ||||
| public class AuthAliUserService extends ServiceImpl<AuthAliUserDao, AuthAliUser> { | ||||
|     @Resource | ||||
|     private AuthAliUserDao authAliUserDao; | ||||
|     public AuthAliUser getOne(){ | ||||
|         AuthAliUser authAliUser  =  this.getOne(new QueryWrapper<AuthAliUser>() | ||||
|                 .last("limit 1") | ||||
|         ); | ||||
|         if(authAliUser == null){ | ||||
|             authAliUser = new AuthAliUser(); | ||||
|         } | ||||
|         return authAliUser; | ||||
|     } | ||||
| 
 | ||||
| } | ||||
| @ -0,0 +1,19 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||||
| <mapper namespace="com.glxp.api.dao.auth.AuthAliUserDao"> | ||||
|   <resultMap id="BaseResultMap" type="com.glxp.api.entity.auth.AuthAliUser"> | ||||
|     <!--@mbg.generated--> | ||||
|     <!--@Table auth_ali_user--> | ||||
|     <id column="id" jdbcType="BIGINT" property="id" /> | ||||
|     <result column="erpId" jdbcType="INTEGER" property="erpid" /> | ||||
|     <result column="appKey" jdbcType="VARCHAR" property="appkey" /> | ||||
|     <result column="appSecret" jdbcType="VARCHAR" property="appsecret" /> | ||||
|     <result column="refEntId" jdbcType="VARCHAR" property="refentid" /> | ||||
|     <result column="type" jdbcType="VARCHAR" property="type" /> | ||||
|   </resultMap> | ||||
|   <sql id="Base_Column_List"> | ||||
|     <!--@mbg.generated--> | ||||
|     id, erpId, appKey, appSecret, refEntId, `type` | ||||
|   </sql> | ||||
| 
 | ||||
| </mapper> | ||||
					Loading…
					
					
				
		Reference in New Issue