Selaa lähdekoodia

供应商资料修改

Aslee 4 vuotta sitten
vanhempi
commit
9e00d86de7

+ 6 - 6
src/main/java/com/caimei365/user/controller/ShopApi.java

@@ -40,7 +40,7 @@ public class ShopApi {
      *
      * spi旧接口:/supplier/modifiedData
      *
-     * @param shop ShopUpdateDto{
+     * @param shopUpdateDto ShopUpdateDto{
      *                        shopId                    供应商Id
      *                        userId                    用户Id
      *                        name                      组织名称
@@ -63,26 +63,26 @@ public class ShopApi {
      *                        faxNumber                 传真号(fax)
      *                        companyNature             传真号(nature)
      *                        turnover                  年营业额
-     *                        medicalPraticeLicenseImg  医疗执业许可证(medicalPraticeLicenseImg1)
+     *                        medicalPracticeLicenseImg 医疗执业许可证(medicalPracticeLicenseImg1)
      *                        shopDesc                  公司介绍(info)
      *                        businessScope             经营范围
      *                        logo                      公司LOGO
      *                    }
-     * @param operationLicence          生产经营证书
+     * @param operationLicence          生产经营证书(productionLicence)
      * @param hygienicLicense           卫生许可证
      * @param taxLicense                税务登记证
-     * @param honorCertification        荣誉证书
+     * @param honorCertification        荣誉证书(certificateHonor)
      * @param productCertification      产品证书
      * @return ClubUpdateDto
      */
     @GetMapping("/info/update")
-    public ResponseJson<Map<String, Object>> updateShopUserInfo(ShopUpdateDto shop,
+    public ResponseJson<ShopUpdateDto> updateShopUserInfo(ShopUpdateDto shopUpdateDto,
                                                                 String operationLicence,
                                                                 String hygienicLicense,
                                                                 String taxLicense,
                                                                 String honorCertification,
                                                                 String productCertification) {
-        return shopService.updateShopUserInfo(shop, operationLicence, hygienicLicense, taxLicense, honorCertification, productCertification);
+        return shopService.updateShopUserInfo(shopUpdateDto, operationLicence, hygienicLicense, taxLicense, honorCertification, productCertification);
     }
 
 }

+ 11 - 12
src/main/java/com/caimei365/user/mapper/ClubMapper.java

@@ -1,10 +1,8 @@
 package com.caimei365.user.mapper;
 
 import com.caimei365.user.model.dto.ClubUpdateDto;
-import com.caimei365.user.model.po.ClubPo;
 import com.caimei365.user.model.po.UserPo;
 import com.caimei365.user.model.vo.ClubVo;
-import com.caimei365.user.model.vo.UserVo;
 import org.apache.ibatis.annotations.Mapper;
 
 /**
@@ -15,21 +13,22 @@ import org.apache.ibatis.annotations.Mapper;
  */
 @Mapper
 public interface ClubMapper {
-    /**
-     * 根据用户Id查询机构用户
-     * @param userId
-     * @return
-     */
-    UserVo getUserByUserId(Integer userId);
-
     /**
      * 根据Id查询机构
-     * @param clubId
-     * @return
+     * @param clubId    机构Id
+     * @return ClubVo
      */
     ClubVo getClubById(Integer clubId);
 
-    void updateUserByUpdateInfo(UserPo user);
+    /**
+     * 修改机构信息保存用户
+     * @param user   用户数据
+     */
+    void updateClubUserByUpdateInfo(UserPo user);
 
+    /**
+     * 修改机构信息保存机构
+     * @param club  机构数据
+     */
     void updateClubByUpdateInfo(ClubUpdateDto club);
 }

+ 32 - 8
src/main/java/com/caimei365/user/mapper/ShopMapper.java

@@ -1,10 +1,9 @@
 package com.caimei365.user.mapper;
 
-import com.caimei365.user.model.dto.ClubUpdateDto;
+import com.caimei365.user.model.dto.ShopUpdateDto;
 import com.caimei365.user.model.po.UserPo;
-import com.caimei365.user.model.vo.ClubVo;
+import com.caimei365.user.model.vo.ShopCertVo;
 import com.caimei365.user.model.vo.ShopVo;
-import com.caimei365.user.model.vo.UserVo;
 import org.apache.ibatis.annotations.Mapper;
 
 import java.util.List;
@@ -19,15 +18,40 @@ import java.util.List;
 public interface ShopMapper {
     /**
      * 根据Id查询供应商
-     * @param shopId
-     * @return
+     * @param shopId    供应商Id
+     * @return ShopVo
      */
     ShopVo getShopById(Integer shopId);
 
-    void updateUserByUpdateInfo(UserPo user);
-
-    void updateClubByUpdateInfo(ClubUpdateDto club);
+    /**
+     * 修改供应商信息保存用户
+     * @param user  用户数据
+     */
+    void updateShopUserByUpdateInfo(UserPo user);
 
+    /**
+     * 修改供应商信息保存供应商
+     * @param shop  供应商数据
+     */
+    void updateShopByUpdateInfo(ShopUpdateDto shop);
 
+    /**
+     * 根据供应商Id和资质证书类型Id获取供应商资质证书
+     * @param shopId            供应商Id
+     * @param shopCertTypeId    资质证书类型Id
+     * @return String
+     */
     List<String> getShopCert(Integer shopId, Integer shopCertTypeId);
+
+    /**
+     * 根据供应商Id删除供应商资质证书数据
+     * @param shopId    供应商Id
+     */
+    void deleteShopCertByShopId(Integer shopId);
+
+    /**
+     * 保存供应商资质证书
+     * @param shopCert  资质证书数据
+     */
+    void insertShopCert(ShopCertVo shopCert);
 }

+ 2 - 2
src/main/java/com/caimei365/user/model/dto/ShopUpdateDto.java

@@ -101,9 +101,9 @@ public class ShopUpdateDto implements Serializable {
      */
     private Double turnover;
     /**
-     * 医疗执业许可证(medicalPraticeLicenseImg1)
+     * 医疗执业许可证(medicalPracticeLicenseImg1)
      */
-    private String medicalPraticeLicenseImg;
+    private String medicalPracticeLicenseImg;
     /**
      * 公司介绍(info)
      */

+ 42 - 0
src/main/java/com/caimei365/user/model/po/ShopCertPo.java

@@ -0,0 +1,42 @@
+package com.caimei365.user.model.po;
+
+import lombok.Data;
+
+/**
+ * 采美供应商资质认证
+ *
+ * @author : Aslee
+ * @date : 2021/3/17
+ */
+
+@Data
+public class ShopCertPo {
+    /**
+     * 供应商Id(shopID)
+     */
+    private Integer shopId;
+    /**
+     * 供应商资质类型ID(1:荣誉证书,2:生产经营证书,3:产品证书,4:其他,5:卫生许可证,6:税务登记证)(shopCertTypeID)
+     */
+    private Integer shopCertTypeId;
+    /**
+     * 资质类型名称
+     */
+    private String name;
+    /**
+     * 资质类型图片
+     */
+    private String image;
+    /**
+     * 组织
+     */
+    private String organization;
+    /**
+     * 生效时间
+     */
+    private String effectDate;
+    /**
+     * 失效时间
+     */
+    private String loseEfficacyDate;
+}

+ 17 - 0
src/main/java/com/caimei365/user/model/vo/ShopCertVo.java

@@ -0,0 +1,17 @@
+package com.caimei365.user.model.vo;
+
+import com.caimei365.user.model.po.ShopCertPo;
+import com.caimei365.user.model.po.ShopPo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * Description
+ *
+ * @author : Aslee
+ * @date : 2021/3/17
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ShopCertVo extends ShopCertPo {
+}

+ 39 - 1
src/main/java/com/caimei365/user/service/ShopService.java

@@ -22,5 +22,43 @@ public interface ShopService {
      */
     ResponseJson<Map<String, Object>> getShopUserInfo(Integer userId);
 
-    ResponseJson<Map<String, Object>> updateShopUserInfo(ShopUpdateDto shop, String operationLicence, String hygienicLicense, String taxLicense, String honorCertification, String productCertification);
+    /**
+     * 修改供应商资料
+     *
+     * @param shopUpdateDto ShopUpdateDto{
+     *                        shopId                    供应商Id
+     *                        userId                    用户Id
+     *                        name                      组织名称
+     *                        sName                     供应商公司简称(sname)
+     *                        email                     邮箱
+     *                        contractPhone             固定电话
+     *                        linkMan                   联系人
+     *                        provinceId                省(provinceID)
+     *                        cityId                    市(cityID)
+     *                        townId                    所在县区Id(townID)
+     *                        address                   地址
+     *                        socialCreditCode          统一社会信用代码(营业执照编号)
+     *                        businessLicense           营业执照(businessLicenseImage)
+     *                        firstShopType             医疗=1和非医疗=2
+     *                        secondShopType            医疗的二级分类 一类器械=1、二类器械 =2、三类器械=3、其他=4 /// 1和非医疗没有二级分类
+     *                        mainProduct               主打项目(mainpro)
+     *                        mainProductDesc           主打商品说明(productDesc)
+     *                        legalPerson               法人代表
+     *                        registeredCapital         注册资本
+     *                        faxNumber                 传真号(fax)
+     *                        companyNature             传真号(nature)
+     *                        turnover                  年营业额
+     *                        medicalPracticeLicenseImg 医疗执业许可证(medicalPracticeLicenseImg1)
+     *                        shopDesc                  公司介绍(info)
+     *                        businessScope             经营范围
+     *                        logo                      公司LOGO
+     *                    }
+     * @param operationLicence          生产经营证书(productionLicence)
+     * @param hygienicLicense           卫生许可证
+     * @param taxLicense                税务登记证
+     * @param honorCertification        荣誉证书(certificateHonor)
+     * @param productCertification      产品证书
+     * @return ClubUpdateDto
+     */
+    ResponseJson<ShopUpdateDto> updateShopUserInfo(ShopUpdateDto shopUpdateDto, String operationLicence, String hygienicLicense, String taxLicense, String honorCertification, String productCertification);
 }

+ 1 - 1
src/main/java/com/caimei365/user/service/impl/ClubServiceImpl.java

@@ -127,7 +127,7 @@ public class ClubServiceImpl implements ClubService {
         // 组织名称
         user.setName(club.getName());
         // 更新机构用户信息
-        clubMapper.updateUserByUpdateInfo(user);
+        clubMapper.updateClubUserByUpdateInfo(user);
         // 最后修改时间
         club.setLastModifyTime(dateFormat.format(new Date()));
         // 更新机构信息

+ 5 - 5
src/main/java/com/caimei365/user/service/impl/RegisterServiceImpl.java

@@ -444,15 +444,15 @@ public class RegisterServiceImpl implements RegisterService {
         shop.setSName(shopRegisterDto.getSName());
         // 联系人
         shop.setLinkMan(shopRegisterDto.getLinkMan());
-        shop.setLinkMan1(shopRegisterDto.getLinkMan());
-        shop.setLinkMan2(shopRegisterDto.getLinkMan());
+//        shop.setLinkMan1(shopRegisterDto.getLinkMan());
+//        shop.setLinkMan2(shopRegisterDto.getLinkMan());
         // 绑定手机号
         shop.setContractMobile(shopRegisterDto.getBindMobile());
-        shop.setContractMobile1(shopRegisterDto.getBindMobile());
-        shop.setContractMobile2(shopRegisterDto.getBindMobile());
+//        shop.setContractMobile1(shopRegisterDto.getBindMobile());
+//        shop.setContractMobile2(shopRegisterDto.getBindMobile());
         // 绑定邮箱
         shop.setContractEmail1(shopRegisterDto.getEmail());
-        shop.setContractEmail2(shopRegisterDto.getEmail());
+//        shop.setContractEmail2(shopRegisterDto.getEmail());
         // 绑定地址
         shop.setProvinceId(shopRegisterDto.getProvinceId());
         shop.setCityId(shopRegisterDto.getCityId());

+ 81 - 29
src/main/java/com/caimei365/user/service/impl/ShopServiceImpl.java

@@ -107,61 +107,113 @@ public class ShopServiceImpl implements ShopService {
     }
 
 
+    /**
+     * 修改供应商资料
+     *
+     * @param shopUpdateDto ShopUpdateDto{
+     *                        shopId                    供应商Id
+     *                        userId                    用户Id
+     *                        name                      组织名称
+     *                        sName                     供应商公司简称(sname)
+     *                        email                     邮箱
+     *                        contractPhone             固定电话
+     *                        linkMan                   联系人
+     *                        provinceId                省(provinceID)
+     *                        cityId                    市(cityID)
+     *                        townId                    所在县区Id(townID)
+     *                        address                   地址
+     *                        socialCreditCode          统一社会信用代码(营业执照编号)
+     *                        businessLicense           营业执照(businessLicenseImage)
+     *                        firstShopType             医疗=1和非医疗=2
+     *                        secondShopType            医疗的二级分类 一类器械=1、二类器械 =2、三类器械=3、其他=4 /// 1和非医疗没有二级分类
+     *                        mainProduct               主打项目(mainpro)
+     *                        mainProductDesc           主打商品说明(productDesc)
+     *                        legalPerson               法人代表
+     *                        registeredCapital         注册资本
+     *                        faxNumber                 传真号(fax)
+     *                        companyNature             传真号(nature)
+     *                        turnover                  年营业额
+     *                        medicalPracticeLicenseImg 医疗执业许可证(medicalPracticeLicenseImg1)
+     *                        shopDesc                  公司介绍(info)
+     *                        businessScope             经营范围
+     *                        logo                      公司LOGO
+     *                    }
+     * @param operationLicence          生产经营证书(productionLicence)
+     * @param hygienicLicense           卫生许可证
+     * @param taxLicense                税务登记证
+     * @param honorCertification        荣誉证书(certificateHonor)
+     * @param productCertification      产品证书
+     * @return ClubUpdateDto
+     */
     @Override
-    public ResponseJson<Map<String, Object>> updateShopUserInfo(ShopUpdateDto shopUpdateDto, String operationLicence, String hygienicLicense, String taxLicense, String honorCertification, String productCertification) {
-        ShopPo shop = new ShopPo();
-        UserPo user = new UserPo();
+    public ResponseJson<ShopUpdateDto> updateShopUserInfo(ShopUpdateDto shopUpdateDto, String operationLicence, String hygienicLicense, String taxLicense, String honorCertification, String productCertification) {
+        // 参数校验
+        if (null == shopUpdateDto.getUserId() || null == shopUpdateDto.getShopId()) {
+            return ResponseJson.error("参数异常", null);
+        }
         if (StringUtils.isNotBlank(shopUpdateDto.getEmail())) {
             Integer userIdByEmail = baseMapper.getUserIdByEmail(shopUpdateDto.getEmail());
             if (null != userIdByEmail && !userIdByEmail.equals(shopUpdateDto.getUserId())) {
-                return ResponseJson.error("该邮箱已被使用");
+                return ResponseJson.error("该邮箱已被使用", null);
             }
-            shop.setContractEmail1(shopUpdateDto.getEmail());
-            shop.setContractEmail2(shopUpdateDto.getEmail());
         }
+        /*
+            组装用户数据 user
+         */
+        UserPo user = new UserPo();
+        user.setUserId(shopUpdateDto.getUserId());
+        user.setName(shopUpdateDto.getName());
         user.setUserName(shopUpdateDto.getSName());
-        /*loginDao.updateUser(user);
-        supplierDao.updateShop(shop);
+        user.setEmail(shopUpdateDto.getEmail());
+        // 更新供应商用户信息
+        shopMapper.updateShopUserByUpdateInfo(user);
+        // 更新供应商信息
+        shopMapper.updateShopByUpdateInfo(shopUpdateDto);
         if (StringUtils.isNotBlank(shopUpdateDto.getSocialCreditCode())) {
-            supplierDao.deleteShopCert(shopUpdateDto.getShopID());
+            // 清除数据库证书数据
+            shopMapper.deleteShopCertByShopId(shopUpdateDto.getShopId());
             ShopCertVo shopCert = new ShopCertVo();
-            shopCert.setShopID(shopUpdateDto.getShopID());
-            shopCert.setShopCertTypeID(2);
-            shopCert.setImage(shopUpdateDto.getProductionLicence());
+            shopCert.setShopId(shopUpdateDto.getShopId());
+            shopCert.setShopCertTypeId(2);
+            shopCert.setImage(operationLicence);
             shopCert.setName("生产经营证书");
-            supplierDao.insertShopCert(shopCert);
-            shopCert.setShopCertTypeID(5);
-            shopCert.setImage(shopUpdateDto.getHygienicLicense());
+            // 保存生产经营证书
+            shopMapper.insertShopCert(shopCert);
+            shopCert.setShopCertTypeId(5);
+            shopCert.setImage(hygienicLicense);
             shopCert.setName("卫生许可证");
-            supplierDao.insertShopCert(shopCert);
-            shopCert.setShopCertTypeID(6);
-            shopCert.setImage(shopUpdateDto.getTaxLicense());
+            // 保存卫生许可证
+            shopMapper.insertShopCert(shopCert);
+            shopCert.setShopCertTypeId(6);
+            shopCert.setImage(taxLicense);
             shopCert.setName("税务登记证");
-            supplierDao.insertShopCert(shopCert);
-            if (StringUtils.isNotBlank(shopUpdateDto.getCertificateHonor())) {
-                String[] images = shopUpdateDto.getCertificateHonor().split(",");
+            // 保存税务登记证
+            shopMapper.insertShopCert(shopCert);
+            if (StringUtils.isNotBlank(honorCertification)) {
+                String[] images = honorCertification.split(",");
                 for (String image : images) {
                     if (StringUtils.isNotBlank(image)) {
-                        shopCert.setShopCertTypeID(1);
+                        shopCert.setShopCertTypeId(1);
                         shopCert.setImage(image);
                         shopCert.setName("荣誉证书");
-                        supplierDao.insertShopCert(shopCert);
+                        // 保存荣誉证书
+                        shopMapper.insertShopCert(shopCert);
                     }
                 }
             }
-            if (StringUtils.isNotBlank(shopUpdateDto.getProductCertification())) {
-                String[] images = shopUpdateDto.getProductCertification().split(",");
+            if (StringUtils.isNotBlank(productCertification)) {
+                String[] images = productCertification.split(",");
                 for (String image : images) {
                     if (StringUtils.isNotBlank(image)) {
-                        shopCert.setShopCertTypeID(3);
+                        shopCert.setShopCertTypeId(3);
                         shopCert.setImage(image);
                         shopCert.setName("产品证书");
-                        supplierDao.insertShopCert(shopCert);
+                        // 保存产品证书
+                        shopMapper.insertShopCert(shopCert);
                     }
                 }
             }
         }
-        return model.success();*/
-        return null;
+        return ResponseJson.success("修改供应商资料成功", shopUpdateDto);
     }
 }

+ 5 - 2
src/main/resources/mapper/ClubMapper.xml

@@ -2,12 +2,12 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.caimei365.user.mapper.ClubMapper">
 
-    <update id="updateUserByUpdateInfo">
+    <update id="updateClubUserByUpdateInfo">
         update user set email = #{email},userName = #{userName},name = #{name}
         where userID = #{userId}
     </update>
     <update id="updateClubByUpdateInfo">
-        update club set userID = #{userId}, name = #{name}, sname = #{sName}, contractEmail1 = #{contractEmail},
+        update club set name = #{name}, sname = #{sName}, contractEmail1 = #{contractEmail},
         <if test="contractPhone != null">
             contractPhone = #{contractPhone},
         </if>
@@ -34,4 +34,7 @@
         lastModify = #{lastModifyTime}
         where clubID = #{clubId}
     </update>
+    <select id="getClubById" resultType="com.caimei365.user.model.vo.ClubVo">
+        select * from club where clubID = #{clubId}
+    </select>
 </mapper>

+ 101 - 30
src/main/resources/mapper/ShopMapper.xml

@@ -1,39 +1,110 @@
 <?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.caimei365.user.mapper.ShopMapper">
-
-    <update id="updateUserByUpdateInfo">
-        update user set email = #{email},userName = #{userName},name = #{name}
+    <insert id="insertShopCert">
+        insert into shopcert (shopID, shopCertTypeID, `name`,
+                              image, organization, effectDate,
+                              loseEfficacyDate)
+        values (#{shopId}, #{shopCertTypeId}, #{name},
+                #{image}, #{organization}, #{effectDate},
+                #{loseEfficacyDate})
+    </insert>
+    <update id="updateShopUserByUpdateInfo">
+        update user
+        <set>
+            <if test="name != null">
+                name = #{name},
+            </if>
+            <if test="name != null">
+                userName = #{userName},
+            </if>
+            <if test="name != null">
+                email = #{email},
+            </if>
+        </set>
         where userID = #{userId}
     </update>
-    <update id="updateClubByUpdateInfo">
-        update club set userID = #{userId}, name = #{name}, sname = #{sName}, contractEmail1 = #{contractEmail},
-        <if test="contractPhone != null">
-            contractPhone = #{contractPhone},
-        </if>
-        <if test="linkMan != null">
-            linkMan = #{linkMan},
-        </if>
-        provinceID = #{provinceId}, cityID = #{cityId}, townID = #{townId}, address = #{address},
-        <if test="shopPhoto != null  and shopPhoto != 'null'  and shopPhoto != ''">
-            headpic = #{shopPhoto},
-        </if>
-        businessLicenseImage = #{businessLicense}, socialCreditCode = #{socialCreditCode}, firstClubType = #{firstClubType},
-        <if test="firstClubType == 1">
-            secondClubType = #{secondClubType}, department = #{department}, medicalPracticeLicenseImg = #{medicalPracticeLicense},
-        </if>
-        <if test="mainProduct != null">
-            mainpro = #{mainProduct},
-        </if>
-        <if test="fax != null">
-            fax = #{fax},
-        </if>
-        <if test="profile != null">
-            info = #{profile},
-        </if>
-        lastModify = #{lastModifyTime}
-        where clubID = #{clubId}
+    <update id="updateShopByUpdateInfo">
+        update shop
+        <set>
+            <if test="name != null">
+                name = #{name},
+            </if>
+            <if test="name != null">
+                sname = #{sName},
+            </if>
+            <if test="email != null">
+                contractEmail1 = #{email},
+            </if>
+            <if test="contractPhone != null">
+                contractPhone = #{contractPhone},
+            </if>
+            <if test="linkMan != null">
+                linkMan = #{linkMan},
+            </if>
+            <if test="provinceId != null">
+                provinceID = #{provinceId},
+            </if>
+            <if test="cityId != null">
+                cityID = #{cityId},
+            </if>
+            <if test="townId != null">
+                townID = #{townId},
+            </if>
+            <if test="address != null">
+                address = #{address},
+            </if>
+            <if test="socialCreditCode != null">
+                socialCreditCode = #{socialCreditCode},
+            </if>
+            <if test="businessLicense != null">
+                businessLicenseImage = #{businessLicense},
+            </if>
+            <if test="firstShopType != null">
+                firstShopType = #{firstShopType},
+            </if>
+            <if test="secondShopType != null">
+                secondShopType = #{secondShopType},
+            </if>
+            <if test="mainProduct != null">
+                mainpro = #{mainProduct},
+            </if>
+            <if test="mainProductDesc != null">
+                productDesc = #{mainProductDesc},
+            </if>
+            <if test="legalPerson != null">
+                legalPerson = #{legalPerson},
+            </if>
+            <if test="registeredCapital != null">
+                registeredCapital = #{registeredCapital},
+            </if>
+            <if test="faxNumber != null">
+                fax = #{faxNumber},
+            </if>
+            <if test="companyNature != null">
+                nature = #{companyNature},
+            </if>
+            <if test="turnover != null">
+                turnover = #{turnover},
+            </if>
+            <if test="medicalPracticeLicenseImg != null">
+                medicalPracticeLicenseImg1 = #{medicalPracticeLicenseImg},
+            </if>
+            <if test="shopDesc != null">
+                info = #{shopDesc},
+            </if>
+            <if test="businessScope != null">
+                businessScope = #{businessScope},
+            </if>
+            <if test="logo != null">
+                logo = #{logo},
+            </if>
+        </set>
+        where shopID = #{shopId}
     </update>
+    <delete id="deleteShopCertByShopId">
+        DELETE FROM shopcert WHERE shopID = #{shopId}
+    </delete>
     <select id="getShopCert" resultType="java.lang.String">
         SELECT image FROM shopcert WHERE shopID = #{shopId} AND shopCertTypeID = #{shopCertTypeId}
     </select>