SellerMapper.xml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.caimei365.user.mapper.SellerMapper">
  4. <select id="getLoginSellerByMobile" resultType="com.caimei365.user.model.vo.UserLoginVo">
  5. select u.userID as userId,
  6. u.clubID as clubId,
  7. u.shopID as shopId,
  8. u.userName as userName,u.name as name,
  9. u.mobile as mobile,
  10. u.bindMobile as bindMobile,
  11. u.email as email,
  12. u.guideFlag as guideFlag,
  13. u.userPermission as userPermission,
  14. u.userIdentity as userIdentity,
  15. u.password as password
  16. from user u
  17. where
  18. u.mobile = #{mobile}
  19. and u.userIdentity = 1
  20. and u.userPermission = 4
  21. and u.validFlag = 1
  22. </select>
  23. <update id="updateServiceProviderByUserId">
  24. update serviceprovider
  25. set openid = #{openId}, unionId = #{unionId}
  26. where userID = #{userId}
  27. </update>
  28. <select id="findClubTemporary" resultType="com.caimei365.user.model.vo.ClubTemporaryVo">
  29. SELECT
  30. `id`,
  31. `userId`,
  32. `name`,
  33. `shortName`,
  34. `bindMobile`,
  35. `contractEmail`,
  36. `linkMan`,
  37. `provinceId`,
  38. `cityId`,
  39. `townId`,
  40. `address`,
  41. `shopPhoto`,
  42. `businessLicense`,
  43. `socialCreditCode`,
  44. `firstClubType`,
  45. `secondClubType`,
  46. `department`,
  47. `medicalPracticeLicense`,
  48. `mainProduct`,
  49. `isAgreed`
  50. FROM
  51. club_temporary
  52. WHERE
  53. userId = #{userId}
  54. <if test="searchName != null and searchName != ''">
  55. AND (name LIKE CONCAT('%',#{searchName},'%') OR linkMan LIKE CONCAT('%',#{searchName},'%'))
  56. </if>
  57. ORDER BY
  58. id DESC
  59. </select>
  60. <update id="updateClubTemporary">
  61. UPDATE
  62. `club_temporary`
  63. SET
  64. `name` = #{name},
  65. `shortName` = #{shortName},
  66. `bindMobile` = #{bindMobile},
  67. `contractEmail` = #{contractEmail},
  68. `linkMan` = #{linkMan},
  69. `provinceId` = #{provinceId},
  70. `cityId` = #{cityId},
  71. `townId` = #{townId},
  72. `address` = #{address},
  73. `shopPhoto` = #{shopPhoto},
  74. `businessLicense` = #{businessLicense},
  75. `socialCreditCode` = #{socialCreditCode},
  76. `firstClubType` = #{firstClubType},
  77. `secondClubType` = #{secondClubType},
  78. `department` = #{department},
  79. `medicalPracticeLicense` = #{medicalPracticeLicense},
  80. `mainProduct` = #{mainProduct},
  81. `isAgreed` = #{isAgreed}
  82. WHERE `id` = #{id}
  83. </update>
  84. <delete id="deleteTemporaryClub">
  85. DELETE FROM `club_temporary` WHERE `id` = #{id}
  86. </delete>
  87. </mapper>