Просмотр исходного кода

企业审核通过后完善岗位里的企业名称

LiFei 6 лет назад
Родитель
Сommit
6b523cce99

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

@@ -8,6 +8,8 @@ import org.jeecg.common.util.StringUtils;
 import org.jeecg.modules.company.entity.CompanyAuthentication;
 import org.jeecg.modules.company.mapper.CompanyAuthenticationMapper;
 import org.jeecg.modules.company.service.ICompanyAuthenticationService;
+import org.jeecg.modules.hpposition.entity.Position;
+import org.jeecg.modules.hpposition.mapper.PositionMapper;
 import org.jeecg.modules.message.entity.Message;
 import org.jeecg.modules.message.mapper.MessageMapper;
 import org.jeecg.modules.message.service.IMessageService;
@@ -42,6 +44,8 @@ public class CompanyAuthenticationServiceImpl extends ServiceImpl<CompanyAuthent
     private IMessageService iMessageService;
     @Resource
     private MessageMapper messageMapper;
+    @Resource
+    private PositionMapper positionMapper;
 
     @Override
     public Page<CompanyAuthentication> queryPageList1(Page<CompanyAuthentication> page, CompanyAuthentication companyAuthentication) {
@@ -206,11 +210,20 @@ public class CompanyAuthenticationServiceImpl extends ServiceImpl<CompanyAuthent
         boolean ok= false;
         try {
             ok = updateById(companyAuthentication);
+            companyAuthentication=getById(companyAuthentication.getId());
             Message message=new Message();
             message.setUserId(companyAuthentication.getUserId());
             if(companyAuthentication.getAuthenticationStatus()==2){
                 message.setTitle("企业认证通过审核");
                 message.setContent("您的企业信息已通过审核");
+                List<Position> list=positionMapper.findPosition(companyAuthentication.getUserId());
+                if(list.size()<0){
+                    for (int i = 0; i <list.size() ; i++) {
+                        Position position=list.get(i);
+                        position.setEnterpriseName(companyAuthentication.getEnterpriseName());
+                        positionMapper.changePositionName(position);
+                    }
+                }
             }else if(companyAuthentication.getAuthenticationStatus()==3){
                 message.setTitle("企业认证未通过审核");
                 message.setContent("您的企业信息未通过审核");
@@ -219,7 +232,7 @@ public class CompanyAuthenticationServiceImpl extends ServiceImpl<CompanyAuthent
             message.setType(2);
             message.setIsRead(0);
             message.setDelFlag("0");
-            ok=iMessageService.updateById(message);
+            ok=iMessageService.save(message);
         } catch (Exception e) {
             e.printStackTrace();
         }

+ 4 - 0
happy-boot-module-hppay/src/main/java/org/jeecg/modules/hpposition/mapper/PositionMapper.java

@@ -28,4 +28,8 @@ public interface PositionMapper extends BaseMapper<Position> {
     PositionAPI getPosition(String id);
 
     List<String> findListByUserId(@Param("userId") String userId);
+
+    List<Position> findPosition(@Param("userId")Integer userId);
+
+    void changePositionName(@Param("Position")Position position);
 }

+ 56 - 0
happy-boot-module-hppay/src/main/java/org/jeecg/modules/hpposition/mapper/xml/PositionMapper.xml

@@ -193,6 +193,52 @@
 	</insert>
 
 
+	<update id="update" parameterType="org.jeecg.modules.hpposition.entity.Position">
+		UPDATE dp_position SET
+			user_id = #{Position.userId},
+			position_name = #{Position.positionName},
+			enterprise_name = #{Position.enterpriseName},
+			position_detail = #{Position.positionDetail},
+			position_category = #{Position.positionCategory},
+			fulltime_position_type = #{Position.fulltimePositionType},
+			parttime_position_type = #{Position.parttimePositionType},
+			recruit_number = #{Position.recruitNumber},
+			basic_salary = #{Position.basicSalary},
+			salary_period = #{Position.salaryPeriod},
+			salary = #{Position.salary},
+			other_salary = #{Position.otherSalary},
+			salary_structure = #{Position.salaryStructure},
+			welfare = #{Position.welfare},
+			has_regular_bus = #{Position.hasRegularBus},
+			qualification = #{Position.qualification},
+			age_range = #{Position.ageRange},
+			gender = #{Position.gender},
+			work_experience = #{Position.workExperience},
+			is_health_certification = #{Position.isHealthCertification},
+			work_date = #{Position.workDate},
+			start_work_time = #{Position.startWorkTime},
+			end_word_time = #{Position.endWordTime},
+			is_publish_nationwide = #{Position.isPublishNationwide},
+			contact_person = #{Position.contactPerson},
+			contact_phone = #{Position.contactPhone},
+			create_time = #{Position.createTime},
+			end_date = #{Position.endDate},
+			is_pause = #{Position.isPause},
+			update_time = #{Position.updateTime},
+			is_on = #{Position.isOn},
+			authentication_status = #{Position.authenticationStatus},
+			require_group=#{Position.requireGroup},
+			settlement_method=#{Position.settlementMethod}
+		WHERE id = #{Position.id}
+	</update>
+
+
+	<update id="changePositionName" parameterType="org.jeecg.modules.hpposition.entity.Position">
+		UPDATE dp_position SET
+			position_name = #{Position.positionName}
+		WHERE id = #{Position.id}
+	</update>
+
 
 	<select id="getPosition"  resultType="org.jeecg.modules.api.dpposition.entity.PositionAPI" >
 		SELECT
@@ -213,4 +259,14 @@
 			a.user_id = #{userId}
 		</where>
 	</select>
+
+
+	<select id="findPosition" resultType="org.jeecg.modules.hpposition.entity.Position">
+		SELECT
+		<include refid="positionColumns"/>
+		FROM dp_position a
+		<where>
+			a.user_id = #{userId}
+		</where>
+	</select>
 </mapper>