提交 fa84b432 作者: 恶龙咆哮

Merge branch 'develop'

package com.mmc.iuav.user.model.dto.dronepilot;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author 张培
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
public class FlyingTeam{
@ApiModelProperty(value = "后台id")
private Integer backUserId;
@ApiModelProperty(value = "后台对应的公司名称")
private String companyName;
}
......@@ -109,4 +109,8 @@ public class PilotCertificationDTO {
private String userImg;
@ApiModelProperty(value = "关注状态")
private Boolean status;
@ApiModelProperty(value = "飞手团队名称")
private String flyingTeam;
@ApiModelProperty(value = "飞手团队对应的后台id")
private Integer backUserId;
}
......@@ -61,5 +61,7 @@ public class PilotCertificationQO implements Serializable {
@ApiModelProperty(value = "",hidden = true)
private Integer tokenUserId;
@ApiModelProperty(value = "飞手团队的后台id")
private Integer backUserId;
}
......@@ -78,4 +78,7 @@ public class CompanyInfoVO implements Serializable {
private String backImg;
@ApiModelProperty(value = "当前距离")
private Double distance;
@ApiModelProperty(value = "后台账号id")
private Integer backUserId;
}
......@@ -93,6 +93,8 @@ public class UserApplyTagVO implements Serializable {
@NotNull(message = "经度不能为空", groups = {Insert.class})
private Double lon;
@ApiModelProperty(value = "后台账号id")
private Integer backUserId;
@ApiModelProperty(value = "签署状态: 0、等待平台签署1、平台签署失败 2、等待(买家/供应商)签署(平台签署成功) 3、(买家/供应商)签署失败 4、(买家/供应商)签署成功、5、归档")
private Integer signStatus;
......
......@@ -50,6 +50,12 @@ public interface UserServiceDao {
void update(UserAccountDO userAccountDO);
/**
* 查询是否存在这个用户
* @param userId 用户id
* @return {@link Integer} 1存在
*/
Integer getCountUser(Integer userId);
/**
* 根据用户地区查询后台用户id
*
* @param provinceCode
......
......@@ -6,6 +6,7 @@ import com.mmc.iuav.user.entity.dronepilot.PilotAbilityDO;
import com.mmc.iuav.user.entity.dronepilot.PilotCertificationDO;
import com.mmc.iuav.user.entity.dronepilot.PilotCertificationLogDO;
import com.mmc.iuav.user.entity.dronepilot.PilotReasonDO;
import com.mmc.iuav.user.model.dto.dronepilot.FlyingTeam;
import com.mmc.iuav.user.model.qo.dronepilot.*;
import com.mmc.iuav.user.model.vo.dronepilot.PilotAbilityVO;
import org.apache.ibatis.annotations.Mapper;
......@@ -39,6 +40,21 @@ public interface PilotCertificationDao {
List<PilotCertificationDO> pilotList(PilotCertificationQO param);
/**
* 查询这个用户是否绑定飞手团队
* @param userId 飞手id
* @return int 1 说明绑定了 0 表示没有绑定
*/
int selectCompanyByUserId(Integer userId);
/**
* 根据飞手id查询飞手团队名称
* @param userId 飞手id
* @return {@link String}
*/
FlyingTeam selectCompanyNameByFlyingUserId(Integer userId);
Integer getPilotAuditSum(Integer status);
List<PilotAbilityVO> selectAbilityList(Integer pilotCertificationId);
......
......@@ -41,6 +41,8 @@ public class UserApplyTagDO implements Serializable {
private CompanyInfoDO companyInfoDO;
@ApiModelProperty(value = "附件", example = "http://")
private List<AttachmentVO> attachmentList;
@ApiModelProperty(value = "后台账号id" )
private Integer backUserId;
/**
* 辅助字段end
......@@ -55,6 +57,7 @@ public class UserApplyTagDO implements Serializable {
.remark(this.remark)
.applyTime(createTime)
.orderNo(orderNo)
.backUserId(this.backUserId)
.approvalStatus(applyStatus)
.cooperationTagName(tagName)
.signStatus(signStatus)
......
......@@ -238,10 +238,26 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
}
pilotList = pilotList.stream().filter(t -> t.getPilotAbility() != null).collect(Collectors.toList());
}
List<PilotCertificationDTO> collect = pilotList.stream().map(PilotCertificationDO::buildPilotCertificationDTO).collect(Collectors.toList());
collect = collect.stream().skip((pageNo - 1) * param.getPageSize()).limit(param.getPageSize()).
List<PilotCertificationDTO> collects = pilotList.stream().map(PilotCertificationDO::buildPilotCertificationDTO).collect(Collectors.toList());
for (PilotCertificationDTO certificationDTO:collects) {
Integer userAccountId = certificationDTO.getUserAccountId();
if (certificationDao.selectCompanyByUserId(userAccountId) < 1) {
continue;
}else {
FlyingTeam flyingTeam = certificationDao.selectCompanyNameByFlyingUserId(userAccountId);
certificationDTO.setFlyingTeam(flyingTeam.getCompanyName());
certificationDTO.setBackUserId(flyingTeam.getBackUserId());
}
}
Integer backUserId = param.getBackUserId();
if(backUserId == null) {
collects = collects.stream().skip((pageNo - 1) * param.getPageSize()).limit(param.getPageSize()).
collect(Collectors.toList());
PageResult pageResult = PageResult.buildPage(pageNo, param.getPageSize(), pilotList.size(), collect);
}else {
collects = collects.stream().filter(collect -> backUserId.equals(collect.getBackUserId())).skip((pageNo - 1) * param.getPageSize()).limit(param.getPageSize()).
collect(Collectors.toList());
}
PageResult pageResult = PageResult.buildPage(pageNo, param.getPageSize(), pilotList.size(), collects);
return pageResult;
}
......
......@@ -292,6 +292,7 @@ public class UserFddAuthServiceImpl implements UserFddAuthService {
CompanyVerifyUrlParams params = new CompanyVerifyUrlParams();
params.setCustomerId(customerId);
params.setPageModify("1");//1允许 2不允许 默认为1
params.setVerifiedWay("3");
//设置回调通知
params.setNotifyUrl(FddConnectConstant.MMC_URL + FddConstant.NOTIFY_E_CERT_RES);
params.setMVerifiedWay("4");
......
......@@ -94,6 +94,7 @@ public class CompanyServiceImpl implements CompanyService {
BackUserAccountDO backUserAccountDO = backUserAccountDao.getBackUserAccountDO(companyBackUserDO.getBackUserAccountId());
if (backUserAccountDO != null) {
companyInfoVO.setPhoneNum(backUserAccountDO.getPhoneNum());
companyInfoVO.setBackUserId(companyBackUserDO.getBackUserAccountId());
}
}
return ResultBody.success(companyInfoVO);
......
......@@ -247,7 +247,11 @@ public class UserAccountServiceImpl implements UserAccountService {
userAccount.setId(id);
userAccount.setPhoneNum(userPhoneNumber);
userServiceDao.update(userAccount);
if (rcdUserId != null) {
System.out.println(userAccount);
Integer countUser = userServiceDao.getCountUser(rcdUserId);
if (countUser != null && countUser !=0) {
// if (rcdUserId != null) {
UserRcdDO userRcd = new UserRcdDO();
userRcd.setUserAccountId(id);
userRcd.setRcdUserId(rcdUserId);
......
......@@ -18,6 +18,7 @@
<result property="orderNo" column="order_no"/>
<result property="signStatus" column="sign_status"/>
<result property="contractNo" column="contract_no"/>
<result property="backUserId" column="back_user_account_id"/>
<association property="companyInfoDO" javaType="com.mmc.iuav.user.entity.CompanyInfoDO">
<id property="id" column="company_info_id"/>
......@@ -274,13 +275,15 @@
ci.lon,
ci.content,
ci.score,
cti.sign_status
cti.sign_status,
cbu.back_user_account_id
FROM
user_apply_tag ua
INNER JOIN cooperation_tag ct ON ua.cooperation_tag_id = ct.id
INNER JOIN company_member cm ON cm.user_account_id = ua.user_account_id
INNER JOIN company_info ci ON cm.company_info_id = ci.id
left join contract_info cti on ua.order_no = cti.order_no
left join company_back_user cbu on cbu.company_info_id = cm.company_info_id
<where>
ua.is_deleted = 0
<if test="cooperationTagId != null">
......
......@@ -653,5 +653,8 @@
</foreach>
</if>
</select>
<select id="getCountUser" resultType="java.lang.Integer">
select count(id) from user_account where id = #{userId}
</select>
</mapper>
......@@ -492,4 +492,15 @@
INNER JOIN pilot_join_team pjt on pjt.back_user_id = cbu.back_user_account_id
WHERE pjt.pilot_user_id = #{pilotId} and ci.is_deleted = 0 and pjt.pilot_status = #{pilotStatus}
</select>
<select id="selectCompanyByUserId" resultType="java.lang.Integer">
select count(id) from pilot_join_team where pilot_user_id = #{userId}
</select>
<select id="selectCompanyNameByFlyingUserId"
resultType="com.mmc.iuav.user.model.dto.dronepilot.FlyingTeam">
select company_name,back_user_id from company_info ci
inner join company_back_user cbu on ci.id = cbu.company_info_id
inner join pilot_join_team pjt on cbu.back_user_account_id = pjt.back_user_id
where pjt.pilot_user_id = #{userId}
</select>
</mapper>
......@@ -18,4 +18,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: 2419eaf6f5b03b29f5e861246d60dd58f30cd7ef
newTag: 1976db65260dc9cb7999ba6eda7fad3e4f16ee15
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论