Kaynağa Gözat

重写企业信息保存方法

LiFei 6 yıl önce
ebeveyn
işleme
c2f961469e

+ 2 - 0
happy-boot-module-hppay/src/main/java/org/jeecg/modules/company/mapper/CompanyAuthenticationMapper.java

@@ -20,4 +20,6 @@ public interface CompanyAuthenticationMapper extends BaseMapper<CompanyAuthentic
     List<CompanyAuthentication> getEnterpriseList(@Param("CompanyAuthentication") CompanyAuthentication companyAuthentication);
 
     String findCompanyName(@Param("userId") int i);
+
+    void saveCompanyInfo(@Param("CompanyAuthentication")CompanyAuthentication companyAuthentication);
 }

+ 27 - 0
happy-boot-module-hppay/src/main/java/org/jeecg/modules/company/mapper/xml/CompanyAuthenticationMapper.xml

@@ -21,6 +21,33 @@
     </sql>
 
 
+    <insert id="saveCompanyInfo" keyProperty="CompanyAuthentication.id" useGeneratedKeys="true" parameterType="org.jeecg.modules.company.entity.CompanyAuthentication">
+		INSERT INTO dp_position(
+			user_id,
+			license_front,
+			other_license,
+			enterprise_name,
+			expiry_date,
+			is_human_resource,
+			authentication_status,
+			create_time,
+			update_time,
+			del_flag
+		) VALUES (
+			#{CompanyAuthentication.userId},
+			#{CompanyAuthentication.licenseFront},
+			#{CompanyAuthentication.otherLicense},
+			#{CompanyAuthentication.enterpriseName},
+			#{CompanyAuthentication.expiryDate},
+			#{CompanyAuthentication.isHumanResource},
+			#{CompanyAuthentication.authenticationStatus},
+			#{CompanyAuthentication.createTime},
+			#{CompanyAuthentication.updateTime},
+			#{CompanyAuthentication.delFlag}
+		)
+	</insert>
+
+
     <select id="queryPageList1" resultType="org.jeecg.modules.company.entity.CompanyAuthentication">
         SELECT
         <include refid="companyColumns"/>

+ 4 - 1
happy-boot-module-hppay/src/main/java/org/jeecg/modules/company/service/impl/CompanyAuthenticationServiceImpl.java

@@ -101,7 +101,10 @@ public class CompanyAuthenticationServiceImpl extends ServiceImpl<CompanyAuthent
             } else {
                 System.out.println("wpnonono========没有文件上传");
             }
-            save(companyAuthentication);
+            companyAuthentication.setCreateTime(new Date());
+            companyAuthentication.setUpdateTime(new Date());
+            companyAuthentication.setDelFlag("0");
+            companyAuthenticationMapper.saveCompanyInfo(companyAuthentication);
             returnMap.put("companyAuthentication", companyAuthentication);
         } else {
             returnMap.put("success", "1004");