Kaynağa Gözat

2023年9月23日14:49:50

纪新园 1 yıl önce
ebeveyn
işleme
db4a83a18f

+ 1 - 22
iot-admin/src/main/resources/application-druid.yml

@@ -6,30 +6,9 @@ spring:
     druid:
       # 主库数据源
       master:
-        #url: jdbc:mysql://124.70.179.5:3306/LinuxServer?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
-        #url: jdbc:mysql://124.70.179.5:3306/linshi?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
-        #        url: jdbc:mysql://124.70.179.5:3306/JinGang?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
-        #url: jdbc:mysql://119.3.74.195:3306/LianHuaShengYun?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
-        #url: jdbc:mysql://119.3.74.195:3306/jhy?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
-        url: jdbc:mysql://119.3.74.195:3306/had?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
-        #        url: jdbc:mysql://123.60.138.20:3306/sengneng?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
+        url: jdbc:mysql://123.60.138.20:3306/iot_database?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
         username: root
         password: daasan7ujm^YHN
-
-      # 从库数据源 loadmile
-      slave:
-        # 从数据源开关/默认关闭
-        enabled: true
-        url: jdbc:firebirdsql://49.4.78.17:3050/C:\sealong\TMS\DataDemo\SLEMP-TMS.FB25?encoding=GB_2312
-        username: SYSDBA
-        password: masterkey
-
-      attachs:
-        # 图片数据库
-        enabled: true
-        url: jdbc:firebirdsql://49.4.78.17:3050/C:\sealong\TMS\DataDemo\SLEMP-ATTACHS.FB25?encoding=GB_2312
-        username: SYSDBA
-        password: masterkey
       # 初始连接数
       initialSize: 5
       # 最小连接池数量

+ 0 - 46
iot-admin/src/main/resources/application.yml

@@ -83,52 +83,6 @@ spring:
         # #连接池最大阻塞等待时间(使用负值表示没有限制)
         max-wait: -1ms
 
-  # 微信公众号相关配置
-wechat:
-    # 微信公众号token有效时间(天)
-    expireTime: 7200
-    # 微信公众号的应用id
-    appId:  wx2fda0438d280bd40
-#    appId:  wx85e10d1b0cc19a77
-    # 密钥      公众号密钥 a9cc9b497e2d077f6b4a1b54e0817fb3
-    secret: a9cc9b497e2d077f6b4a1b54e0817fb3
-#    secret: f646cebf205cc0274e01bae898b266ea
-    # 密钥      模板id
-    # PkeerRaAwBYrwvvrbKrXiGzYok0tehLa9huVxQ6vkco
-    templateId: 9ZTvMwwbvOL9Sy245oBJtrB9jfGOLLmsntzPvJ_dYfg
-    # 获取基础access_token的接口
-    accessTokenUrl:  https://api.weixin.qq.com/cgi-bin/token
-    # 创建菜单的接口
-    menuUrl: https://api.weixin.qq.com/cgi-bin/menu/create
-    # 通过UID机制获取用户信息的接口
-    userInfoUrl: https://api.weixin.qq.com/cgi-bin/user/info
-    # 网页授权时,通过code获取access_token和openid的接口
-    loginTokenUrl:  https://api.weixin.qq.com/sns/oauth2/access_token
-    # 根据access_token(非基础access_token)和openid换取用户信息的接口
-    loginInfoUrl: https://api.weixin.qq.com/sns/userinfo
-    # 发送模板消息的接口
-    templateMsgUrl: https://api.weixin.qq.com/cgi-bin/message/template/send
-    # 获取模板信息
-    templateUrl: https://api.weixin.qq.com/cgi-bin/template/get_all_private_template
-
-  # 微信小程序相关配置
-wechatProgram:
-    # 微信小程序应用id
-    appId: wx7a77bcad492d7570
-    # 微信小程序密钥
-    secret: 864a27937ad71fbdf3299cdcec32dab0
-    # 获取用户信息
-    sessionUrl: https://api.weixin.qq.com/sns/jscode2session
-
-  # 微信小程序相关配置
-warehouseWechatProgram:
-  # 微信小程序应用id
-  appId: wx114cb497cc0fb8de
-  # 微信小程序密钥
-  secret: b85591e050a7f38e71e4becbc79e0386
-  # 获取用户信息
-  sessionUrl: https://api.weixin.qq.com/sns/jscode2session
-
 # token配置
 token:
     # 令牌自定义标识

+ 0 - 270
iot-framework/src/main/java/com/iot/framework/web/service/WechatService.java

@@ -1,270 +0,0 @@
-package com.iot.framework.web.service;
-
-import com.alibaba.fastjson.JSONException;
-import com.alibaba.fastjson.JSONObject;
-import com.iot.common.core.domain.AjaxResult;
-import com.iot.common.core.domain.entity.SysUser;
-import com.iot.common.core.domain.model.LoginBody;
-import com.iot.common.core.domain.model.LoginUser;
-import com.iot.common.core.redis.RedisCache;
-import com.iot.common.utils.StringUtils;
-import com.iot.common.utils.wechat.AESUtils;
-import com.iot.common.utils.wechat.AccessTokenUtils;
-import com.iot.system.service.impl.SysUserServiceImpl;
-import lombok.extern.slf4j.Slf4j;
-import okhttp3.*;
-import org.apache.commons.codec.binary.Base64;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.security.authentication.AuthenticationManager;
-import org.springframework.stereotype.Component;
-
-import javax.annotation.Resource;
-import java.io.UnsupportedEncodingException;
-import java.security.InvalidAlgorithmParameterException;
-import java.util.Objects;
-
-/**
- * 登录校验方法
- *
- * @author iot
- */
-@Slf4j
-@Component
-public class WechatService {
-
-    @Autowired
-    private TokenService tokenService;
-
-    @Autowired
-    private SysUserServiceImpl sysUserService;
-
-    @Resource
-    private AuthenticationManager authenticationManager;
-
-    @Autowired
-    private RedisCache redisCache;
-    //发送模板路径
-    @Value("${wechat.templateMsgUrl}")
-    private String templateMsgUrl;
-    // 模板id
-    //@Value("${wechat.templateId}")
-   // private String templateId;
-
-
-    /**
-     * 微信生成token
-     *
-     * @param loginBody code
-     * @return 结果
-     */
-    public AjaxResult login(LoginBody loginBody) {
-        if(StringUtils.isNotEmpty(loginBody.getUsertype()) && loginBody.getUsertype().equals("00")){
-            if (StringUtils.isNotEmpty(loginBody.getToken())) {
-                // 仅仅获取token
-                SysUser sysUser = sysUserService.selectUserByPhone(loginBody,"00");
-                if (StringUtils.isNull(sysUser)) {
-                    return AjaxResult.error("未找到用户信息,请确认");
-                }
-                // 生成token
-                LoginUser loginUser = new LoginUser();
-                loginUser.setUser(sysUser);
-                String token = tokenService.wechatCreateToken(loginUser);
-                if (StringUtils.isEmpty(token)) {
-                    return AjaxResult.error("生成token失败");
-                }
-                LoginBody body = new LoginBody();
-                body.setToken(token);
-                body.setPhonenumber(sysUser.getPhonenumber());
-                return AjaxResult.success(body);
-            }
-            // 获取openId、sessionKey
-            SysUser user = sysUserService.weChatProgramLogin(loginBody,"00");
-            if (StringUtils.isNull(user)) {
-                return AjaxResult.error("获取OpenId失败");
-            }
-            // 解密获取手机号
-            try {
-                String dataType = "phoneNumber";
-                AjaxResult ajaxResult = decodeUserInfo(loginBody.getPhonenumber(), loginBody.getIv(), user.getSessionKey(), dataType);
-                String code = ajaxResult.get("code").toString();
-                if ("500".equals(code)) {
-                    return ajaxResult;
-                }
-                user.setPhonenumber(ajaxResult.get("data").toString());
-            } catch (UnsupportedEncodingException e) {
-                log.info("解析手机号UnsupportedEncodingException异常:" + e);
-                e.printStackTrace();
-            } catch (InvalidAlgorithmParameterException e) {
-                log.info("解析手机号InvalidAlgorithmParameterException异常:" + e);
-                e.printStackTrace();
-            }
-            LoginUser loginUser = sysUserService.warehouseCreateOrUpdateUser(user);
-            if (StringUtils.isNull(loginUser)) {
-                return AjaxResult.error("未找到用户信息");
-            }
-            // 生成token
-            String token = tokenService.wechatCreateToken(loginUser);
-            if (StringUtils.isEmpty(token)) {
-                return AjaxResult.error("生成token失败");
-            }
-            LoginBody body = new LoginBody();
-            body.setToken(token);
-            body.setPhonenumber(user.getPhonenumber());
-            return AjaxResult.success(body);
-        }else{
-            if (StringUtils.isNotEmpty(loginBody.getToken())) {
-                // 仅仅获取token
-                SysUser sysUser = sysUserService.selectUserByPhone(loginBody,"11");
-                if (StringUtils.isNull(sysUser)) {
-                    return AjaxResult.error("未找到用户信息,请确认");
-                }
-                // 生成token
-                LoginUser loginUser = new LoginUser();
-                loginUser.setUser(sysUser);
-                String token = tokenService.wechatCreateToken(loginUser);
-                if (StringUtils.isEmpty(token)) {
-                    return AjaxResult.error("生成token失败");
-                }
-                LoginBody body = new LoginBody();
-                body.setToken(token);
-                body.setPhonenumber(sysUser.getPhonenumber());
-                return AjaxResult.success(body);
-            }
-            // 获取openId、sessionKey
-            SysUser user = sysUserService.weChatProgramLogin(loginBody,"11");
-            if (StringUtils.isNull(user)) {
-                return AjaxResult.error("获取OpenId失败");
-            }
-            // 解密获加密信息
-            try {
-                String dataType = "phoneNumber";
-                AjaxResult ajaxResult = decodeUserInfo(loginBody.getPhonenumber(), loginBody.getIv(), user.getSessionKey(), dataType);
-                String code = ajaxResult.get("code").toString();
-                if ("500".equals(code)) {
-                    return ajaxResult;
-                }
-                user.setPhonenumber(ajaxResult.get("data").toString());
-                dataType = "unionId";
-                AjaxResult result = decodeUserInfo(loginBody.getEncryptedData(), loginBody.getEncryptedIv(), user.getSessionKey(), dataType);
-                String code1 = result.get("code").toString();
-                if ("500".equals(code1)) {
-                    return result;
-                }
-                user.setUnionId(result.get("data").toString());
-            } catch (UnsupportedEncodingException e) {
-                log.info("解析手机号UnsupportedEncodingException异常:" + e);
-                e.printStackTrace();
-            } catch (InvalidAlgorithmParameterException e) {
-                log.info("解析手机号InvalidAlgorithmParameterException异常:" + e);
-                e.printStackTrace();
-            }
-            LoginUser loginUser = sysUserService.createOrUpdateUser(user);
-            if (StringUtils.isNull(loginUser)) {
-                return AjaxResult.error("未找到用户信息");
-            }
-            // 生成token
-            String token = tokenService.wechatCreateToken(loginUser);
-            if (StringUtils.isEmpty(token)) {
-                return AjaxResult.error("生成token失败");
-            }
-            LoginBody body = new LoginBody();
-            body.setToken(token);
-            body.setPhonenumber(user.getPhonenumber());
-            return AjaxResult.success(body);
-        }
-    }
-
-    /**
-     * 解密小程序用户敏感数据(暂时用于解密手机号)
-     * https://blog.csdn.net/weixin_42771651/article/details/107359620
-     *
-     * @param encryptedData 明文
-     * @param iv            加密算法的初始向量
-     * @param sessionKey    用户秘钥
-     * @return 结果
-     */
-    public AjaxResult decodeUserInfo(String encryptedData, String iv, String sessionKey, String dataType
-    ) throws UnsupportedEncodingException, InvalidAlgorithmParameterException, JSONException {
-        //AESUtils微信获取手机号解密工具类
-        AESUtils aes = new AESUtils();
-        //调用AESUtils工具类decrypt方法解密获取json串
-        byte[] resultByte = aes.decrypt(Base64.decodeBase64(encryptedData), Base64.decodeBase64(sessionKey), Base64.decodeBase64(iv));
-        //判断返回参数是否为空
-        if (null != resultByte && resultByte.length > 0) {
-            String jsons = new String(resultByte, "UTF-8");
-            JSONObject json = JSONObject.parseObject(jsons);
-            System.out.println("跟手机号同级别数据:" + json.toString());
-            //json解析phoneNumber值
-            String phoneNumber = json.getString(dataType);
-            if (StringUtils.isEmpty(phoneNumber)) {
-                log.info("解析加密异常:" + json.toJSONString());
-                return AjaxResult.error("解析加密异常");
-            }
-            return AjaxResult.success("操作成功", phoneNumber);
-        }
-        return AjaxResult.error(500, "session_key:失败");
-    }
-
-    /**
-     * 发送模板消息
-     *
-     * @param fromUser  接收此消息的openId
-     * @param mblno     提单号
-     * @param route     路线
-     * @param goodsName 商品名
-     * @param loadDate  装货时间
-     * @return 结果
-     */
-    public Objects newsPush(String fromUser, String mblno, String route, String goodsName, String loadDate) {
-        String jsonBody = "{\n" +
-                "  \"touser\": \"" + fromUser + "\",\n" +
-                "  \"template_id\": \"PkeerRaAwBYrwvvrbKrXiGzYok0tehLa9huVxQ6vkco\",\n" +
-                "  \"url\": \"\",\n" +
-                "  \"data\": {\n" +
-                "    \"first\": {\n" +
-                "      \"value\": \"靖润\",\n" +
-                "      \"color\": \"#173177\"\n" +
-                "    },\n" +
-                "    \"keyword1\": {\n" +
-                "      \"value\": \"" + mblno + "\",\n" +
-                "      \"color\": \"#173177\"\n" +
-                "    },\n" +
-                "    \"keyword2\": {\n" +
-                "      \"value\": \"" + route + "\",\n" +
-                "      \"color\": \"#173177\"\n" +
-                "    },\n" +
-                "    \"keyword3\": {\n" +
-                "      \"value\": \"" + goodsName + "\",\n" +
-                "      \"color\": \"#173177\"\n" +
-                "    },\n" +
-                "    \"keyword4\": {\n" +
-                "      \"value\": \"" + loadDate + "点发货\",\n" +
-                "      \"color\": \"#173177\"\n" +
-                "    },\n" +
-                "    \"remark\": {\n" +
-                "      \"value\": \"" + mblno + "\",\n" +
-                "      \"color\": \"#173177\"\n" +
-                "    }\n" +
-                "  }\n" +
-                "}";
-        try {
-            // 客户端
-            OkHttpClient client = new OkHttpClient();
-            // 构建Request请求对象
-            RequestBody body = RequestBody.create(MediaType.parse("application/xml;charset=utf-8"), jsonBody);
-            Request request = new Request.Builder().url(templateMsgUrl + "?access_token=" + AccessTokenUtils.getToken()).post(body).build();
-            // 请求接口,拿到token信息
-            Response response = client.newCall(request).execute();
-            // 判断成功与否
-            if (response.isSuccessful()) {
-                // 拿到相应结果
-                String string = response.body().string();
-                System.out.println("拿到结果了:" + string);
-            }
-        } catch (Exception e) {
-        }
-        return null;
-    }
-
-}

+ 0 - 65
iot-system/src/main/java/com/iot/system/domain/TWarehouseUser.java

@@ -1,65 +0,0 @@
-package com.iot.system.domain;
-
-import com.iot.common.annotation.Excel;
-import com.iot.common.core.domain.BaseEntity;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * 仓库和用户关联对象 t_warehouse_user
- *
- * @author iot
- * @date 2022-01-05
- */
-public class TWarehouseUser extends BaseEntity {
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 用户ID
-     */
-    private Long userId;
-
-    /**
-     * 仓库ID
-     */
-    private Long warehouseId;
-
-    /**
-     * 仓库名称
-     */
-    @Excel(name = "仓库名称")
-    private String warehouseName;
-
-    public void setUserId(Long userId) {
-        this.userId = userId;
-    }
-
-    public Long getUserId() {
-        return userId;
-    }
-
-    public void setWarehouseId(Long warehouseId) {
-        this.warehouseId = warehouseId;
-    }
-
-    public Long getWarehouseId() {
-        return warehouseId;
-    }
-
-    public void setWarehouseName(String warehouseName) {
-        this.warehouseName = warehouseName;
-    }
-
-    public String getWarehouseName() {
-        return warehouseName;
-    }
-
-    @Override
-    public String toString() {
-        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
-                .append("userId", getUserId())
-                .append("warehouseId", getWarehouseId())
-                .append("warehouseName", getWarehouseName())
-                .toString();
-    }
-}

+ 0 - 100
iot-system/src/main/java/com/iot/system/mapper/TWarehouseUserMapper.java

@@ -1,100 +0,0 @@
-package com.iot.system.mapper;
-
-import com.iot.system.domain.TWarehouseUser;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 仓库和用户关联Mapper接口
- *
- * @author iot
- * @date 2022-01-05
- */
-public interface TWarehouseUserMapper {
-    /**
-     * 查询仓库和用户关联
-     *
-     * @param userId 仓库和用户关联ID
-     * @return 仓库和用户关联
-     */
-    public TWarehouseUser selectTWarehouseUserById(Long userId);
-
-    /**
-     * 查询仓库和用户关联列表
-     *
-     * @param tWarehouseUser 仓库和用户关联
-     * @return 仓库和用户关联集合
-     */
-    public List<TWarehouseUser> selectTWarehouseUserList(TWarehouseUser tWarehouseUser);
-
-    /**
-     * 根据用户ID获取仓库选择框列表
-     *
-     * @param userId 用户ID
-     * @return 选中仓库ID列表
-     */
-    public List<Long> selectWarehouseListByUserId(Long userId);
-
-    /**
-     * 新增仓库和用户关联
-     *
-     * @param tWarehouseUser 仓库和用户关联
-     * @return 结果
-     */
-    public int insertTWarehouseUser(TWarehouseUser tWarehouseUser);
-
-    /**
-     * 修改仓库和用户关联
-     *
-     * @param tWarehouseUser 仓库和用户关联
-     * @return 结果
-     */
-    public int updateTWarehouseUser(TWarehouseUser tWarehouseUser);
-
-    /**
-     * 删除仓库和用户关联
-     *
-     * @param userId 仓库和用户关联ID
-     * @return 结果
-     */
-    public int deleteTWarehouseUserById(Long userId);
-
-    /**
-     * 批量删除仓库和用户关联
-     *
-     * @param userIds 需要删除的数据ID
-     * @return 结果
-     */
-    public int deleteTWarehouseUserByIds(Long[] userIds);
-
-    /**
-     * 批量新增用户岗位信息
-     *
-     * @param warehouseUserList 用户仓库列表
-     * @return 结果
-     */
-    public int batchWarehouseUser(List<TWarehouseUser> warehouseUserList);
-
-    /**
-     * 批量新增用户岗位信息
-     *
-     * @param warehouseId 仓库ID
-     * @return 结果
-     */
-    public Map<String, Object> getWarehouseName(Long warehouseId);
-
-    /**
-     * bi大屏仓库列表
-     *
-     * @return 仓库集合
-     */
-    public List<Map<String, Object>> biWarehouseList(Long userId);
-
-    /**
-     * 获取当前登录用户的仓库idList
-     * @param userId
-     * @return
-     */
-    List<Long> getWarehouseIdListByUserId(Long userId);
-}

+ 0 - 24
iot-system/src/main/java/com/iot/system/service/impl/SysConfigServiceImpl.java

@@ -38,23 +38,6 @@ public class SysConfigServiceImpl implements ISysConfigService
     @Autowired
     private SysUserServiceImpl sysUserService;
 
-    @Value("${wechat.accessTokenUrl}")
-    private String accessTokenUrl;
-    //应用ID
-    @Value("${wechat.appId}")
-    private String appId;
-    //开发者密钥
-    @Value("${wechat.secret}")
-    private String secret;
-    // wechat_token 有效时间
-    @Value("${wechat.expireTime}")
-    private int expireTime;
-
-    //获取用户信息的接口地址(通过UID机制)
-    @Value("${wechat.userInfoUrl}")
-    private String userInfoUrl;
-
-
     /**
      * 项目启动时,初始化参数到缓存
      */
@@ -68,13 +51,6 @@ public class SysConfigServiceImpl implements ISysConfigService
             redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue());
         }
         redisCache.deleteObject("wechat_token");
-
-        AccessTokenUtils.appId = this.appId;
-        AccessTokenUtils.secret = this.secret;
-        AccessTokenUtils.expireTime = this.expireTime;
-        AccessTokenUtils.accessTokenUrl =this.accessTokenUrl;
-
-        UserQueue.userInfoUrl = this.userInfoUrl;
         UserQueue.sysUserService = this.sysUserService;
         UserQueue.listen();
 

+ 0 - 131
iot-system/src/main/java/com/iot/system/service/impl/SysUserServiceImpl.java

@@ -14,7 +14,6 @@ import com.iot.common.utils.StringUtils;
 import com.iot.system.domain.SysPost;
 import com.iot.system.domain.SysUserPost;
 import com.iot.system.domain.SysUserRole;
-import com.iot.system.domain.TWarehouseUser;
 import com.iot.system.mapper.*;
 import com.iot.system.service.ISysConfigService;
 import com.iot.system.service.ISysUserService;
@@ -66,35 +65,6 @@ public class SysUserServiceImpl implements ISysUserService {
     @Autowired
     private SysUserPostMapper userPostMapper;
 
-    @Autowired
-    private TWarehouseUserMapper warehouseUserMapper;
-
-
-    // 微信小程序应用id
-    @Value("${wechatProgram.appId}")
-    private String appId;
-
-    // 微信小程序应用密钥
-    @Value("${wechatProgram.secret}")
-    private String secret;
-
-    // 微信小程序获取用户session路径
-    @Value("${wechatProgram.sessionUrl}")
-    private String sessionUrl;
-
-
-    // 仓储微信小程序应用id
-    @Value("${warehouseWechatProgram.appId}")
-    private String warehouseAppId;
-
-    // 仓储微信小程序应用密钥
-    @Value("${warehouseWechatProgram.secret}")
-    private String warehouseSecret;
-
-    // 仓储微信小程序获取用户session路径
-    @Value("${warehouseWechatProgram.sessionUrl}")
-    private String warehouseSessionUrl;
-
     /**
      * 根据条件分页查询用户列表
      *
@@ -241,8 +211,6 @@ public class SysUserServiceImpl implements ISysUserService {
         insertUserPost(user);
         // 新增用户与角色管理
         insertUserRole(user);
-        // 新增用户与仓库关联
-        insertUserWarehouse(user);
         return rows;
     }
 
@@ -264,10 +232,6 @@ public class SysUserServiceImpl implements ISysUserService {
         userPostMapper.deleteUserPostByUserId(userId);
         // 新增用户与岗位管理
         insertUserPost(user);
-        // 删除用户与仓库关联
-        warehouseUserMapper.deleteTWarehouseUserById(userId);
-        // 新增用户与仓库管理
-        insertUserWarehouse(user);
         userMapper.updateCarsDriverNamePhone(userId);
         return userMapper.updateUser(user);
     }
@@ -374,38 +338,6 @@ public class SysUserServiceImpl implements ISysUserService {
     }
 
     /**
-     * 新增用户仓库信息
-     *
-     * @param user 用户对象
-     */
-    public void insertUserWarehouse(SysUser user) {
-        Long[] warehouseIds = user.getWarehouseIds();
-        if (StringUtils.isNotNull(warehouseIds)) {
-            // 新增用户与仓库信息
-            List<TWarehouseUser> list = new ArrayList<>();
-            for (Long warehouseId : warehouseIds) {
-                TWarehouseUser ws = new TWarehouseUser();
-                ws.setUserId(user.getUserId());
-
-                if (warehouseId == 0) {
-                    ws.setWarehouseId(warehouseId);
-                    ws.setWarehouseName("0");
-                    list.clear();
-                    list.add(ws);
-                    break;
-                }
-
-                ws.setWarehouseId(warehouseId);
-                ws.setWarehouseName(String.valueOf(warehouseUserMapper.getWarehouseName(warehouseId).get("warehouseName")));
-                list.add(ws);
-            }
-            if (list.size() > 0) {
-                warehouseUserMapper.batchWarehouseUser(list);
-            }
-        }
-    }
-
-    /**
      * 通过用户ID删除用户
      *
      * @param userId 用户ID
@@ -508,69 +440,6 @@ public class SysUserServiceImpl implements ISysUserService {
         return sysUsers;
     }
 
-    /**
-     * 小程序授权小程序
-     *
-     * @param loginBody 用户信息
-     * @return 结果
-     */
-    @Transactional
-    public SysUser weChatProgramLogin(LoginBody loginBody, String usertype) {
-        //声明客户端
-        OkHttpClient client = new OkHttpClient();
-        //构建Request
-        if(usertype.equals("00")){
-            Request request = new Request.Builder().url(warehouseSessionUrl + "?appid=" + warehouseAppId + "&secret=" + warehouseSecret +
-                    "&js_code=" + loginBody.getCode() + "&grant_type=authorization_code").build();
-            try {
-                Response response = client.newCall(request).execute();
-                //如果请求成功,解析数据
-                if (response.isSuccessful()) {
-                    String body = response.body().string();
-                    //得到一个JSON对象
-                    JSONObject object = JSON.parseObject(body);
-                    String openid = object.getString("openid");
-                    String sessionKey = object.getString("session_key");
-                    if (StringUtils.isNotEmpty(openid)) {
-                        log.info("通过code获取用户openId异常:" + object.toJSONString());
-                        SysUser sysUser = new SysUser();
-                        sysUser.setOpenId(openid);
-                        sysUser.setSessionKey(sessionKey);
-                        return sysUser;
-                    }
-                }
-            } catch (IOException e) {
-                e.printStackTrace();
-                log.info("用户获取openId异常:" + e);
-            }
-        }else{
-            Request request = new Request.Builder().url(sessionUrl + "?appid=" + appId + "&secret=" + secret +
-                    "&js_code=" + loginBody.getCode() + "&grant_type=authorization_code").build();
-            try {
-                Response response = client.newCall(request).execute();
-                //如果请求成功,解析数据
-                if (response.isSuccessful()) {
-                    String body = response.body().string();
-                    //得到一个JSON对象
-                    JSONObject object = JSON.parseObject(body);
-                    String openid = object.getString("openid");
-                    String sessionKey = object.getString("session_key");
-                    if (StringUtils.isNotEmpty(openid)) {
-                        log.info("通过code获取用户openId异常:" + object.toJSONString());
-                        SysUser sysUser = new SysUser();
-                        sysUser.setOpenId(openid);
-                        sysUser.setSessionKey(sessionKey);
-                        return sysUser;
-                    }
-                }
-            } catch (IOException e) {
-                e.printStackTrace();
-                log.info("用户获取openId异常:" + e);
-            }
-        }
-        return null;
-    }
-
     // 用户关注公众号
     @Transactional
     public void attention(SysUser sysUser) {

+ 0 - 421
iot-system/src/main/resources/mapper/system/OrderBillsPlansMapper.xml

@@ -1,421 +0,0 @@
-<?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.iot.system.mapper.OrderBillsPlansMapper">
-    <insert id="insertLoadFeeItems">
-        Insert Into LoadFeeItems (SysID, EntityID, LineNo, CarID, ItemID, ItemProp, ItemAuditType, Dc, Qty, Price, Amt, AMT1, AMT2, AMTORG,
-                                  OpUserID, OpUserName, SrcActID, SrcEntityID, SrcLineNo)
-        values (1, #{o.loadBillsEntityId}, #{i.lineNo}, #{o.carId}, #{i.itemId}, #{i.itemProp}, #{i.auditType}, 'C', 1,
-                #{i.amt}, #{i.amt}, #{i.amt}, #{i.amt}, #{i.amt},
-                #{e.EmplId}, #{e.empl}, #{o.actId}, #{o.entityId}, #{o.lineNo})
-    </insert>
-    <insert id="insertAttachMngs">
-        insert into AttachMngs (SYSID, ENTITYID, ACTID, LINENO, USERNAME,ATTACHNAME)
-        values (#{loadBillsSysId}, #{loadBillsEntityId}, #{actId}, #{lineNo}, #{userName}, #{attachName})
-    </insert>
-
-    <update id="updateOrderBillsPlansByid">
-        update OrderBillsPlans
-        set LoadQty = #{loadQty},
-        LoadDate = #{loadDate},
-        UnLoadQty = #{unLoadQty},
-        UnLoadDate = #{unLoadDate},
-
-        <if test="ifDetour != null and ifDetour != ''">
-            ifDetour = #{ifDetour},
-            <if test="detourEmptyMile != null and detourEmptyMile != '' or detourEmptyMile == 0">
-                detourEmptyMile = #{detourEmptyMile},
-            </if>
-            <if test="detourLoadMile != null and detourLoadMile != '' or detourLoadMile == 0">
-                detourLoadMile = #{detourLoadMile},
-            </if>
-            detourDesc = #{detourDesc},
-        </if>
-        driverassdesc = #{driverassdesc}
-        where sysId = '1'
-        and OrderNo = #{orderNo}
-    </update>
-    <update id="updateOrderBillsPlansByOrderNo">
-        update OrderBillsPlans
-        set loadetc        = #{loadetc},
-            loadtoll       = #{loadtoll},
-            oilhomeQty     = #{oilhomeQty},
-            oilhomeAmt     = #{oilhomeAmt},
-            oilappoint1Qty = #{oilappoint1Qty},
-            oilappoint1Amt = #{oilappoint1Amt},
-            oilappoint2Qty = #{oilappoint2Qty},
-            oilappoint2Amt = #{oilappoint2Amt},
-            oilappoint3Qty = #{oilappoint3Qty},
-            oilappoint3Amt = #{oilappoint3Amt},
-            oilcash1Qty    = #{oilcash1Qty},
-            oilcash1Amt    = #{oilcash1Amt},
-            oilcardQty     = #{oilcardQty},
-            oilcardAmt     = #{oilcardAmt},
-            oilcard1Qty     = #{oilcardQty},
-            oilcard1Amt     = #{oilcardAmt},
-            driverassdesc = #{driverassdesc}
-        where orderNo = #{orderNo}
-    </update>
-    <update id="updateOrderBillsPlansBySysidEntityidLineno">
-
-        update LoadFeeItems
-        set Price   = #{amt},
-            Amt     = #{amt},
-            AMT1    = #{amt},
-            AMT2    = #{amt},
-            AMTORG  = #{amt},
-            remarks = #{remarks}
-        where sysId = '1'
-          AND entityid = #{entityId}
-          and lineno = #{lineNo}
-    </update>
-    <update id="updateLoadBillsByEntityID">
-        update LoadBills
-        set gasstation1 = #{gasstation1},
-            gasstation2 = #{gasstation2},
-            gasstation3 = #{gasstation3}
-        where SrcEntityID = #{entityId} and SrcLineNo = #{lineNo}
-    </update>
-    <update id="submitAudit">
-        update OrderBillsPlans
-        set IfStarted = 'S',
-            startDate = CURRENT_TIMESTAMP
-        where sysId = '1'
-        and OrderNo = #{orderNo}
-    </update>
-    <update id="approved">
-        update OrderBillsPlans
-        set IfStarted = 'A'
-        where sysId = '1'
-          and OrderNo = #{orderNo}
-    </update>
-    <update id="theAuditFailed">
-        update OrderBillsPlans
-        set IfStarted    = 'B'
-        where sysId = '1'
-          and OrderNo = #{orderNo}
-    </update>
-    <update id="approvedTaskList">
-        UPDATE wf_TaskList SET status= 2 WHERE SYSID = '1' AND ACTID =#{actId} AND ENTITYID = #{entityId}
-    </update>
-    <update id="theAuditFailedTaskList">
-        UPDATE wf_TaskList SET status= 0 WHERE SYSID = '1' AND ACTID =#{actId} AND ENTITYID = #{entityId}
-    </update>
-    <update id="upReceipts">
-        update OrderBillsPlans set IfOrder2ed = 'S' where sysId = '1' and OrderNo = #{orderNo}
-    </update>
-
-    <update id="addAReviewComment">
-        update loadbills set ApplyDate = CURRENT_TIMESTAMP, audit2Desc = #{audit2Desc} where SrcEntityID = #{entityId} and SrcLineNo = #{lineNo}
-    </update>
-    <update id="approvedTaskListV1">
-        UPDATE wf_TaskList SET status= #{status} WHERE SYSID = '1' AND ACTID =#{actId} AND ENTITYID = #{entityId}
-    </update>
-
-    <delete id="deleteLoadFeeItemsByEntityId">
-        delete from LoadFeeItems where sysid = 1 and entityid = #{entityId}
-    </delete>
-    <delete id="deleteTmsAttachMngsByAttachId">
-        delete from AttachMngs where attachId = #{attachId}
-    </delete>
-
-
-    <select id="getOrderBillsPlansLsit" parameterType="Map" resultType="com.iot.system.domain.WfTaskList">
-        Select Distinct p.SysID sysId
-        , p.EntityID entityId
-        , p.LineNo lineNo
-        , p.OrderNo orderNo
-        ,p.CarID carID
-        , p.CarRegNo carRegNo
-        ,p.PlanLoadDate planLoadDate
-        , p.LoadDate loadDate
-        , p.LoadAddr loadAddr
-        , p.EMPTYADDR1 emptyAddr1
-        , p.EMPTYADDR2 emptyAddr2
-        ,p.PlanUnLoadDate planUnLoadDate
-        , p.UnLoadDate unLoadDate
-        , p.UnLoadAddr unLoadAddr
-        , p.Remarks remarks
-        ,t.TaskID taskId
-        , t.Status status
-        ,t.AuditStatus auditStatus
-        , t.ActID wfActId
-        ,c.SName corpSName
-        , c.CName corpCName
-        , g.CName goodsCName
-        ,l.SName loadFactory
-        , ul.SName unLoadFactory
-        ,dr1.Empl driver1Name
-        ,dr1.mobile driver1mobile
-        , sp.Empl sUPERCARGOName
-        ,e.Empl transact
-        , b.BillDate billDate
-        , p.rightqty
-        , b.billStatus
-
-        , p.ifLoaded ifLoaded
-        , p.ifUnLoaded ifUnLoaded
-        , p.ifStarted ifStarted
-        , p.ifOrder2ed ifOrder2ed
-        from wf_TaskList t
-        Left join LoadBills b on (b.SysID=t.SysID and b.EntityID=t.EntityID)
-        Left join OrderBillsPlans p on (p.SysID=b.SysID and p.EntityID=b.SrcEntityID and p.LineNo=b.SrcLineNo)
-        Left join Empls e on (e.SysID=b.SysID and e.EmplID=b.TransactID)
-        Left join Empls dr1 on (dr1.SysID=b.SysID and dr1.EmplID=p.DRIVER1ID)
-        Left join Empls sp on (sp.SysID=b.SysID and sp.EmplID=p.SUPERCARGOID)
-        Left join Corps c on (c.SysID=p.SysID and c.CorpID=p.CorpID)
-        Left join Corps l on (l.SysID=p.SysID and l.CorpID=p.LoadFactoryID)
-        Left join Corps ul on (ul.SysID=b.SysID and ul.CorpID=p.UnLoadFactoryID)
-        Left join Goods g on (g.SysID=b.SysID and g.GoodsID=b.GoodsID)
-
-
-        <where>
-            t.SysID=1
-            <if test="type == 'BD'">
-                and t.ActID=317
-                <if test="flowType == '未装车'">
-                    and p.ifLoaded = 'F' and p.ifUnLoaded = 'F' and (p.ifOrder2ed = 'F' or p.ifOrder2ed = 'T')
-                </if>
-                <if test="flowType == '未卸车'">
-                    and p.ifLoaded = 'T' and p.ifUnLoaded = 'F' and (p.ifOrder2ed = 'F' or p.ifOrder2ed = 'T')
-                </if>
-                <if test="flowType == '已卸车'">
-                    and p.ifLoaded = 'T' and p.ifUnLoaded = 'T' and (p.ifOrder2ed = 'F' or p.ifOrder2ed = 'T')
-                </if>
-                <if test="flowType == '已提交'">
-                    and p.ifLoaded = 'T' and p.ifUnLoaded = 'T' and p.ifOrder2ed = 'S'
-                </if>
-                <if test="flowType == '已审核'">
-                    and p.ifLoaded = 'T' and p.ifUnLoaded = 'T' and p.IfOrder2ed = 'O'
-                </if>
-            </if>
-            <if test="type == 'BX'">
-                and t.ActID = #{actId, jdbcType=VARCHAR}
-                <if test="flowType == '未提交'">
-                    and p.ifStarted = 'F'
-                </if>
-                <if test="flowType == '已提交'">
-                    and p.ifStarted = 'S'
-                </if>
-                <if test="flowType == '已通过'">
-                    and p.ifStarted = 'A'
-                </if>
-                <if test="flowType == '已退回'">
-                    and p.ifStarted = 'B'
-                </if>
-            </if>
-            and ((b.CarID=-1) or ((b.CarID &lt;&gt; -1)))
-            <if test="dataStart != null and dataStart != '' and dataEnd != null and dataEnd != ''">
-                and b.BillDate >= #{dataStart, jdbcType=VARCHAR} and b.BillDate &lt;= #{dataEnd, jdbcType=VARCHAR}
-            </if>
-            <if test="role == 0">
-                and p.DeptUserID = #{emplId, jdbcType=VARCHAR}
-            </if>
-            <if test="role == 1">
-                and ((p.DRIVER1ID=#{emplId, jdbcType=VARCHAR}) or (p.SUPERCARGOID=#{emplId, jdbcType=VARCHAR}))
-            </if>
-
-            <if test="orderNo != null and orderNo != ''">
-                and (p.CarRegNo like #{orderNo}
-                or p.loadAddr like #{orderNo}
-                or p.unLoadAddr like #{orderNo}
-                or g.CName like #{orderNo})
-            </if>
-        </where>
-
-        ORDER BY b.BillDate DESC ROWS #{head} TO #{tail}
-
-    </select>
-
-    <select id="getOrderBillsPlansByid" resultType="com.iot.system.domain.OrderBillsPlans">
-        Select g.CName           goodsCName
-             , p.LoadAddr        loadAddr
-             , l.SName           loadFactory
-             , p.LoadAttn        loadAttn
-             , p.LoadAttnTel     loadAttnTel
-             , p.UnLoadAddr      unLoadAddr
-             , ul.SName          unLoadFactory
-             , p.UnLoadAttn      unLoadAttn
-             , p.UNLoadAttnTel   unLoadAttnTel
-             , p.planRemarks
-             , p.orderNo
-             , p.loadQty
-             , p.loadDate
-             , p.unLoadQty
-             , p.unLoadDate
-             , p.emptyaddr1
-             , p.odometerstart
-             , p.emptyaddr2
-             , p.odometerend
-             , p.loadmile
-             , p.remarks
-             , p.driverassdesc
-
-             , dr1.Empl          driver1Name
-             , dr1.mobile        driver1mobile
-
-             , p.sysId
-             , b.entityId        loadBillsEntityId
-             , b.sysId           loadBillsSysId
-             , b.billStatus
-
-             , p.detourEmptyMile detourEmptyMile
-             , p.detourLoadMile  detourLoadMile
-             , p.detourDesc      detourDesc
-             , p.ifDetour        ifDetour
-             , p.CarRegNo        carRegNo
-
-             , p.ifLoaded        ifLoaded
-             , p.ifUnLoaded      ifUnLoaded
-             , p.ifStarted       ifStarted
-             , p.ifOrder2ed      ifOrder2ed
-        from OrderBillsPlans p
-                 Left join Empls e on (e.SysID = p.SysID and e.EmplID = p.TransactID)
-                 Left join Empls dr1 on (dr1.SysID = p.SysID and dr1.EmplID = p.DRIVER1ID)
-                 Left join Empls sp on (sp.SysID = p.SysID and sp.EmplID = p.SUPERCARGOID)
-                 Left join Corps c on (c.SysID = p.SysID and c.CorpID = p.CorpID)
-                 Left join Corps l on (l.SysID = p.SysID and l.CorpID = p.LoadFactoryID)
-                 Left join Corps ul on (ul.SysID = p.SysID and ul.CorpID = p.UnLoadFactoryID)
-                 Left join Goods g on (g.SysID = p.SysID and g.GoodsID = p.GoodsID)
-                 INNER JOIN LoadBills b
-                            ON
-                                        p.SysID = b.SysID
-                                    AND p.EntityID = b.SrcEntityID
-                                    AND p.LineNo = b.SrcLineNo
-        where p.SysID = 1
-          and p.OrderNo = #{orderNo}
-    </select>
-
-
-    <select id="getItemsList" resultType="com.iot.system.domain.vo.ItemsVo">
-        select itemId, cName, itemProp, auditType from Items where SysID=1 and  itemProp='F' order by zorder
-    </select>
-    <select id="getLoadFeeitemsMapByentityIdKeyItemId" resultType="java.util.Map">
-        select itemId, atm1, entityId from LoadFeeItems where entityId = #{entityId}
-    </select>
-    <select id="getGasStations" resultType="com.iot.system.domain.GasStations">
-        select gasStationId, cName from GasStations
-    </select>
-    <select id="getOrderBillsPlansByOrder" resultType="com.iot.system.domain.vo.OrderBillsPlansVo">
-        select o.loadetc
-             , o.loadtoll
-             , o.oilhomeQty
-             , o.oilhomeAmt
-             , o.oilappoint1Qty
-             , o.oilappoint1Amt
-             , o.oilappoint2Qty
-             , o.oilappoint2Amt
-             , o.oilcash1Qty
-             , o.oilcash1Amt
-             , o.oilcardQty
-             , o.oilcardAmt
-             , b.gasstation1
-             , b.gasstation2
-             , o.entityId
-             , o.orderNo
-             , o.carId
-             , o.lineNo
-             , o.actId
-             , b.entityID   loadBillsEntityId
-             , dr1.Empl     driver1Name
-             , dr1.mobile   driver1mobile
-             , b.billStatus
-             , b.entityId   loadBillsEntityId
-             , b.sysId      loadBillsSysId
-             , o.driverassdesc
-
-             , o.ifLoaded      ifLoaded
-             , o.ifUnLoaded    ifUnLoaded
-             , o.ifStarted     ifStarted
-
-             , o.CarRegNo   carRegNo
-             , o.loadAddr   loadAddr
-             , o.unLoadAddr unLoadAddr
-             , g.CName goodsCName
-
-             , o.loadQty loadQty
-             , o.loadDate loadDate
-             , o.unLoadQty unLoadQty
-             , o.unLoadDate unLoadDate
-             , o.ifOrder2ed ifOrder2ed
-        FROM OrderBillsPlans o
-                 INNER JOIN LoadBills b
-                            ON
-                                        o.SysID = b.SysID
-                                    AND o.EntityID = b.SrcEntityID
-                                    AND o.LineNo = b.SrcLineNo
-
-                 Left join Empls dr1 on dr1.EmplID = o.DRIVER1ID
-                 Left join Goods g on (g.SysID=b.SysID and g.GoodsID=b.GoodsID)
-        where o.orderNo = #{orderNo}
-          and dr1.SysID = 1
-    </select>
-    <select id="getLoadFeeItemsByEntityId" resultType="com.iot.system.domain.LoadFeeItems">
-        select l.itemid, l.amt, i.cName, i.itemProp, i.auditType, l.lineNo, l.entityid, l.remarks
-        from LoadFeeItems l
-                 inner join Items i on l.ItemID = i.ItemID
-        where l.sysid = 1
-          and l.entityId = #{entityId}  order by l.lineno
-    </select>
-    <select id="getAttachMngsBySysIdEntityId" resultType="java.lang.Long">
-        select MAX(lineNo) from AttachMngs where sysId = #{loadBillsSysId} and entityId = #{loadBillsEntityId}
-    </select>
-    <select id="getAttachMngsAttachtypeIdBySysIdAndEntityIdAndLineNo" resultType="java.lang.Long">
-        select attachId from AttachMngs where SysId = #{loadBillsSysId} and EntityId = #{loadBillsEntityId} and LineNo = #{lineNo}
-    </select>
-    <select id="getAttachMngsAttachIdBySysIdAndEntityIdAndActId" resultType="java.lang.Long">
-        select attachId from AttachMngs where SysId = #{loadBillsSysId} and EntityId = #{loadBillsEntityId} and ActID = #{actId}
-    </select>
-    <select id="getLoadBillsByOrderNo">
-        select *
-        FROM OrderBillsPlans o
-                 INNER JOIN LoadBills b
-                            ON
-                                        o.SysID = b.SysID
-                                    AND o.EntityID = b.SrcEntityID
-                                    AND o.LineNo = b.SrcLineNo
-    </select>
-    <select id="getIsMileageOrderBillsPlansByOrder" resultType="com.iot.system.domain.WfTaskList">
-        SELECT
-            t.SYSID,
-            p.orderNo
-        FROM
-            wf_TaskList t
-                LEFT JOIN LoadBills b ON
-                (b.SysID = t.SysID
-                    AND b.EntityID = t.EntityID)
-                LEFT JOIN OrderBillsPlans p ON
-                (p.SysID = b.SysID
-                    AND p.EntityID = b.SrcEntityID
-                    AND p.LineNo = b.SrcLineNo)
-                LEFT JOIN Empls e ON
-                (e.SysID = b.SysID
-                    AND e.EmplID = b.TransactID)
-                LEFT JOIN Empls dr1 ON
-                (dr1.SysID = b.SysID
-                    AND dr1.EmplID = p.DRIVER1ID)
-                LEFT JOIN Empls sp ON
-                (sp.SysID = b.SysID
-                    AND sp.EmplID = p.SUPERCARGOID)
-                LEFT JOIN Corps c ON
-                (c.SysID = p.SysID
-                    AND c.CorpID = p.CorpID)
-                LEFT JOIN Corps l ON
-                (l.SysID = p.SysID
-                    AND l.CorpID = p.LoadFactoryID)
-                LEFT JOIN Corps ul ON
-                (ul.SysID = b.SysID
-                    AND ul.CorpID = p.UnLoadFactoryID)
-                LEFT JOIN Goods g ON
-                (g.SysID = b.SysID
-                    AND g.GoodsID = b.GoodsID)
-        WHERE
-            t.SysID = 1
-          AND p.orderNo = #{orderNo}
-          AND t.ActID = 317
-          AND t.Status = 2
-          and p.ifLoaded != 'T'
-          and p.ifUnLoaded != 'T'
-    </select>
-</mapper>

+ 0 - 94
iot-system/src/main/resources/mapper/system/TWarehouseUserMapper.xml

@@ -1,94 +0,0 @@
-<?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.iot.system.mapper.TWarehouseUserMapper">
-
-    <resultMap type="TWarehouseUser" id="TWarehouseUserResult">
-        <result property="userId"    column="user_id"    />
-        <result property="warehouseId"    column="warehouse_id"    />
-        <result property="warehouseName"    column="warehouse_name"    />
-    </resultMap>
-
-    <sql id="selectTWarehouseUserVo">
-        select user_id, warehouse_id, warehouse_name from t_warehouse_user
-    </sql>
-
-    <select id="selectTWarehouseUserList" parameterType="TWarehouseUser" resultMap="TWarehouseUserResult">
-        <include refid="selectTWarehouseUserVo"/>
-        <where>
-            <if test="warehouseName != null  and warehouseName != ''"> and warehouse_name like concat('%', #{warehouseName}, '%')</if>
-        </where>
-    </select>
-
-    <select id="selectWarehouseListByUserId" parameterType="Long" resultType="Long">
-        select warehouse_id
-        from t_warehouse_user
-        where user_id = #{userId}
-    </select>
-
-    <select id="selectTWarehouseUserById" parameterType="Long" resultMap="TWarehouseUserResult">
-        <include refid="selectTWarehouseUserVo"/>
-        where user_id = #{userId}
-    </select>
-
-    <insert id="insertTWarehouseUser" parameterType="TWarehouseUser">
-        insert into t_warehouse_user
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="userId != null">user_id,</if>
-            <if test="warehouseId != null">warehouse_id,</if>
-            <if test="warehouseName != null and warehouseName != ''">warehouse_name,</if>
-         </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="userId != null">#{userId},</if>
-            <if test="warehouseId != null">#{warehouseId},</if>
-            <if test="warehouseName != null and warehouseName != ''">#{warehouseName},</if>
-         </trim>
-    </insert>
-
-    <update id="updateTWarehouseUser" parameterType="TWarehouseUser">
-        update t_warehouse_user
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="warehouseId != null">warehouse_id = #{warehouseId},</if>
-            <if test="warehouseName != null and warehouseName != ''">warehouse_name = #{warehouseName},</if>
-        </trim>
-        where user_id = #{userId}
-    </update>
-
-    <delete id="deleteTWarehouseUserById" parameterType="Long">
-        delete from t_warehouse_user where user_id = #{userId}
-    </delete>
-
-    <delete id="deleteTWarehouseUserByIds" parameterType="String">
-        delete from t_warehouse_user where user_id in
-        <foreach item="userId" collection="array" open="(" separator="," close=")">
-            #{userId}
-        </foreach>
-    </delete>
-
-    <insert id="batchWarehouseUser">
-        insert into t_warehouse_user(user_id, warehouse_id, warehouse_name) values
-        <foreach item="item" index="index" collection="list" separator=",">
-            (#{item.userId}, #{item.warehouseId}, #{item.warehouseName})
-        </foreach>
-    </insert>
-
-    <select id="getWarehouseName" parameterType="Long" resultType="map">
-        select f_name as warehouseName
-        from t_warehouse
-        where f_id = #{warehouseId}
-    </select>
-
-    <select id="biWarehouseList" parameterType="Long" resultType="map">
-        select
-            warehouse_id as warehouseId,
-            warehouse_name as warehouseName
-        from t_warehouse_user
-        where user_id = #{userId}
-        order by convert(warehouse_name using gbk)
-    </select>
-    <select id="getWarehouseIdListByUserId" resultType="java.lang.Long">
-        select warehouse_id from t_warehouse_user where user_id = #{userId}
-    </select>
-
-</mapper>