提交 c85c55f0 作者: 刘明祎-运维用途

Merge branch 'develop'

流水线 #8622 已通过 于阶段
in 2 分 44 秒
...@@ -21,6 +21,8 @@ import java.util.List; ...@@ -21,6 +21,8 @@ import java.util.List;
public class ApplyTagEditVO implements Serializable { public class ApplyTagEditVO implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private Integer id; private Integer id;
@ApiModelProperty(value = "用户id")
private Integer companyInfoId;
@ApiModelProperty(value = "网点id") @ApiModelProperty(value = "网点id")
private Integer websiteId; private Integer websiteId;
@ApiModelProperty(value = "标签id") @ApiModelProperty(value = "标签id")
...@@ -53,4 +55,6 @@ public class ApplyTagEditVO implements Serializable { ...@@ -53,4 +55,6 @@ public class ApplyTagEditVO implements Serializable {
private String contractNo; private String contractNo;
@ApiModelProperty(value = "合同签署状态") @ApiModelProperty(value = "合同签署状态")
private Integer signStatus; private Integer signStatus;
@ApiModelProperty(value = "企业视频")
private String profileUrl;
} }
...@@ -81,4 +81,7 @@ public class CompanyInfoVO implements Serializable { ...@@ -81,4 +81,7 @@ public class CompanyInfoVO implements Serializable {
@ApiModelProperty(value = "后台账号id") @ApiModelProperty(value = "后台账号id")
private Integer backUserId; private Integer backUserId;
@ApiModelProperty(value = "企业视频")
private String profileUrl;
} }
...@@ -4,6 +4,7 @@ import com.mmc.iuav.group.Create; ...@@ -4,6 +4,7 @@ import com.mmc.iuav.group.Create;
import com.mmc.iuav.group.Update; import com.mmc.iuav.group.Update;
import com.mmc.iuav.group.UpdatePassword; import com.mmc.iuav.group.UpdatePassword;
import com.mmc.iuav.response.ResultBody; import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.entity.BackUserSuggestionDO;
import com.mmc.iuav.user.model.qo.BUserAccountQO; import com.mmc.iuav.user.model.qo.BUserAccountQO;
import com.mmc.iuav.user.model.vo.BUserAccountVO; import com.mmc.iuav.user.model.vo.BUserAccountVO;
import com.mmc.iuav.user.model.vo.BackUserAccountVO; import com.mmc.iuav.user.model.vo.BackUserAccountVO;
...@@ -98,5 +99,24 @@ public class BackUserAccountController extends BaseController { ...@@ -98,5 +99,24 @@ public class BackUserAccountController extends BaseController {
return backUserAccountService.getMessage(); return backUserAccountService.getMessage();
} }
@ApiOperation("后台--添加(修改)后台用户建议")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("updateSuggestion")
public ResultBody updateSuggestion(@RequestBody BackUserSuggestionDO backUserSuggestionDO, HttpServletRequest request) {
return backUserAccountService.insertCompanySuggestion(backUserSuggestionDO,this.getUserLoginInfoFromRedis(request).getUserAccountId());
}
@ApiOperation("后台--获取后台用户建议")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("getSuggestion")
public ResultBody getSuggestion(@RequestParam Integer backUserId) {
return backUserAccountService.getSuggestion(backUserId);
}
@ApiOperation("后台--删除后台用户建议")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("deleteSuggestion")
public ResultBody deleteSuggestion(@RequestParam Integer id) {
return backUserAccountService.deleteSuggestion(id);
}
} }
package com.mmc.iuav.user.dao;
import com.mmc.iuav.user.entity.BackUserSuggestionDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author Admin
* @description 针对表【back_user_suggestion】的数据库操作Mapper
* @createDate 2024-03-26 13:54:46
* @Entity .com.mmc.iuav.user.entity.BackUserSuggestionDO
*/
@Mapper
public interface BackUserSuggestionDao {
int deleteByPrimaryKey(Integer id);
int insert(BackUserSuggestionDO record);
int insertSelective(BackUserSuggestionDO record);
List<BackUserSuggestionDO> selectByPrimaryKey(Integer backUserId);
int countSelectSuggestion(Integer backUserId);
int updateByPrimaryKeySelective(BackUserSuggestionDO record);
int updateByPrimaryKey(BackUserSuggestionDO record);
}
...@@ -39,6 +39,8 @@ public interface CooperationDao { ...@@ -39,6 +39,8 @@ public interface CooperationDao {
*/ */
UserApplyTagDO getUserApplyTag(Integer id); UserApplyTagDO getUserApplyTag(Integer id);
UserApplyTagDO getUserApplyTagByCompanyId(Integer companyId);
/** /**
* 根据合同编号查询用户 * 根据合同编号查询用户
* @param contractNo * @param contractNo
......
package com.mmc.iuav.user.entity;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
*
* @TableName back_user_suggestion
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class BackUserSuggestionDO implements Serializable {
/**
*
*/
private Integer id;
/**
* 企业建议标题
*/
private String title;
/**
* 企业建议的图标
*/
private String coverUrl;
/**
* 企业建业的文件
*/
private String suggestFile;
/**
* 绑定的后台账户
*/
@JsonIgnore
private Integer backUserId;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
...@@ -53,13 +53,15 @@ public class CompanyInfoDO implements Serializable { ...@@ -53,13 +53,15 @@ public class CompanyInfoDO implements Serializable {
private Integer leader; private Integer leader;
@ApiModelProperty(value = "当前距离") @ApiModelProperty(value = "当前距离")
private Double distance; private Double distance;
@ApiModelProperty(value = "企业视频")
private String profileUrl;
public CompanyInfoDO(ApplyTagEditVO applyTagEditVO) { public CompanyInfoDO(ApplyTagEditVO applyTagEditVO) {
this.address = applyTagEditVO.getAddress(); this.address = applyTagEditVO.getAddress();
this.lon = applyTagEditVO.getLon(); this.lon = applyTagEditVO.getLon();
this.lat = applyTagEditVO.getLat(); this.lat = applyTagEditVO.getLat();
this.content = applyTagEditVO.getContent(); this.content = applyTagEditVO.getContent();
this.score = applyTagEditVO.getScore(); this.score = applyTagEditVO.getScore();
this.profileUrl = applyTagEditVO.getProfileUrl();
} }
public CompanyInfoVO buildCompanyInfoVO() { public CompanyInfoVO buildCompanyInfoVO() {
...@@ -74,6 +76,7 @@ public class CompanyInfoDO implements Serializable { ...@@ -74,6 +76,7 @@ public class CompanyInfoDO implements Serializable {
.score(this.getScore()) .score(this.getScore())
.backImg(this.backImg) .backImg(this.backImg)
.distance(this.distance) .distance(this.distance)
.profileUrl(this.profileUrl)
.build(); .build();
} }
......
...@@ -44,6 +44,8 @@ public class UserApplyTagDO implements Serializable { ...@@ -44,6 +44,8 @@ public class UserApplyTagDO implements Serializable {
@ApiModelProperty(value = "后台账号id" ) @ApiModelProperty(value = "后台账号id" )
private Integer backUserId; private Integer backUserId;
@ApiModelProperty(value = "企业视频")
private String profileUrl;
/** /**
* 辅助字段end * 辅助字段end
*/ */
...@@ -103,6 +105,7 @@ public class UserApplyTagDO implements Serializable { ...@@ -103,6 +105,7 @@ public class UserApplyTagDO implements Serializable {
.contractNo(contractNo) .contractNo(contractNo)
.remark(this.remark) .remark(this.remark)
.signStatus(signStatus) .signStatus(signStatus)
.profileUrl(this.profileUrl)
.build(); .build();
} }
} }
...@@ -2,10 +2,12 @@ package com.mmc.iuav.user.service; ...@@ -2,10 +2,12 @@ package com.mmc.iuav.user.service;
import com.mmc.iuav.response.ResultBody; import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.entity.BackUserAccountDO; import com.mmc.iuav.user.entity.BackUserAccountDO;
import com.mmc.iuav.user.entity.BackUserSuggestionDO;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO; import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
import com.mmc.iuav.user.model.qo.BUserAccountQO; import com.mmc.iuav.user.model.qo.BUserAccountQO;
import com.mmc.iuav.user.model.vo.BUserAccountVO; import com.mmc.iuav.user.model.vo.BUserAccountVO;
import com.mmc.iuav.user.model.vo.BackUserAccountVO; import com.mmc.iuav.user.model.vo.BackUserAccountVO;
import io.swagger.models.auth.In;
import java.util.List; import java.util.List;
...@@ -99,4 +101,11 @@ public interface BackUserAccountService { ...@@ -99,4 +101,11 @@ public interface BackUserAccountService {
* @return {@link ResultBody} * @return {@link ResultBody}
*/ */
ResultBody getMessage(); ResultBody getMessage();
ResultBody insertCompanySuggestion(BackUserSuggestionDO backUserSuggestionDO,Integer backUserId);
ResultBody getSuggestion(Integer backUserId);
ResultBody deleteSuggestion(Integer id);
} }
...@@ -10,13 +10,11 @@ import com.mmc.iuav.user.client.OmsClient; ...@@ -10,13 +10,11 @@ import com.mmc.iuav.user.client.OmsClient;
import com.mmc.iuav.user.client.PmsClient; import com.mmc.iuav.user.client.PmsClient;
import com.mmc.iuav.user.constant.GeneralConstant; import com.mmc.iuav.user.constant.GeneralConstant;
import com.mmc.iuav.user.dao.BackUserAccountDao; import com.mmc.iuav.user.dao.BackUserAccountDao;
import com.mmc.iuav.user.dao.BackUserSuggestionDao;
import com.mmc.iuav.user.dao.CooperationDao; import com.mmc.iuav.user.dao.CooperationDao;
import com.mmc.iuav.user.dao.RoleDao; import com.mmc.iuav.user.dao.RoleDao;
import com.mmc.iuav.user.dao.dronepilot.PilotCertificationDao; import com.mmc.iuav.user.dao.dronepilot.PilotCertificationDao;
import com.mmc.iuav.user.entity.BackUserAccountDO; import com.mmc.iuav.user.entity.*;
import com.mmc.iuav.user.entity.CompanyBackUserDO;
import com.mmc.iuav.user.entity.CompanyInfoDO;
import com.mmc.iuav.user.entity.RoleInfoDO;
import com.mmc.iuav.user.enums.CompanyTypeEnums; import com.mmc.iuav.user.enums.CompanyTypeEnums;
import com.mmc.iuav.user.enums.RoleEnums; import com.mmc.iuav.user.enums.RoleEnums;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO; import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
...@@ -63,6 +61,8 @@ public class BackUserAccountServiceImpl implements BackUserAccountService { ...@@ -63,6 +61,8 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
private PilotCertificationDao certificationDao; private PilotCertificationDao certificationDao;
@Autowired @Autowired
private BackUserSuggestionDao backUserSuggestionDao;
@Autowired
private OmsClient omsClient; private OmsClient omsClient;
@Autowired @Autowired
...@@ -315,4 +315,28 @@ public class BackUserAccountServiceImpl implements BackUserAccountService { ...@@ -315,4 +315,28 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
newMessageVO.setUserStateMessage(num); newMessageVO.setUserStateMessage(num);
return ResultBody.success(newMessageVO); return ResultBody.success(newMessageVO);
} }
@Override
public ResultBody insertCompanySuggestion(BackUserSuggestionDO backUserSuggestionDO,Integer backUserId) {
backUserSuggestionDO.setBackUserId(backUserId);
if(backUserSuggestionDO.getId() != null) {
backUserSuggestionDao.updateByPrimaryKeySelective(backUserSuggestionDO);
return ResultBody.success();
}
backUserSuggestionDao.insertSelective(backUserSuggestionDO);
return ResultBody.success();
}
@Override
public ResultBody getSuggestion(Integer backUserId) {
List<BackUserSuggestionDO> backUserSuggestionDO = backUserSuggestionDao.selectByPrimaryKey(backUserId);
return ResultBody.success(backUserSuggestionDO);
}
@Override
public ResultBody deleteSuggestion(Integer id) {
backUserSuggestionDao.deleteByPrimaryKey(id);
return ResultBody.success();
}
} }
...@@ -300,21 +300,26 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -300,21 +300,26 @@ public class CooperationServiceImpl implements CooperationService {
@Override @Override
public ResultBody editUserApplyTag(ApplyTagEditVO applyTagEditVO) { public ResultBody editUserApplyTag(ApplyTagEditVO applyTagEditVO) {
//判断当前服务商是否通过审核 Integer companyInfoId = applyTagEditVO.getCompanyInfoId();
UserApplyTagDO userApplyTag = cooperationDao.getUserApplyTag(applyTagEditVO.getId()); UserApplyTagDO userApplyTag = new UserApplyTagDO();
if(companyInfoId != null ){
userApplyTag = cooperationDao.getUserApplyTagByCompanyId(companyInfoId);
}else {
//判断当前服务商是否通过审核
userApplyTag = cooperationDao.getUserApplyTag(applyTagEditVO.getId());
}
if (!userApplyTag.getApplyStatus().equals(1)) { if (!userApplyTag.getApplyStatus().equals(1)) {
return ResultBody.error("当前服务商暂未通过审核!"); return ResultBody.error("当前服务商暂未通过审核!");
} }
//if (StringUtils.isBlank(applyTagEditVO.getRemark())) { //if (StringUtils.isBlank(applyTagEditVO.getRemark())) {
UserApplyTagDO userApplyTagDO = new UserApplyTagDO(); UserApplyTagDO userApplyTagDO = new UserApplyTagDO();
userApplyTagDO.setId(applyTagEditVO.getId()); userApplyTagDO.setId(applyTagEditVO.getId());
userApplyTagDO.setRemark(applyTagEditVO.getRemark());
cooperationDao.updateUserApplyTag(userApplyTagDO); cooperationDao.updateUserApplyTag(userApplyTagDO);
// } // }
cooperationDao.deleteApplyResource(applyTagEditVO.getId()); cooperationDao.deleteApplyResource(applyTagEditVO.getId());
if (!CollectionUtils.isEmpty(applyTagEditVO.getAttachmentList())) { if (!CollectionUtils.isEmpty(applyTagEditVO.getAttachmentList())) {
applyTagEditVO.getAttachmentList().forEach(d -> d.setUserApplyTagId(userApplyTag.getId())); UserApplyTagDO finalUserApplyTag = userApplyTag;
applyTagEditVO.getAttachmentList().forEach(d -> d.setUserApplyTagId(finalUserApplyTag.getId()));
cooperationDao.insertApplyResource(applyTagEditVO.getAttachmentList()); cooperationDao.insertApplyResource(applyTagEditVO.getAttachmentList());
} }
// 修改单位网点位置信息 // 修改单位网点位置信息
...@@ -322,6 +327,7 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -322,6 +327,7 @@ public class CooperationServiceImpl implements CooperationService {
CompanyInfoDO companyInfoDO1 = new CompanyInfoDO(applyTagEditVO); CompanyInfoDO companyInfoDO1 = new CompanyInfoDO(applyTagEditVO);
companyInfoDO1.setId(companyInfoDO.getId()); companyInfoDO1.setId(companyInfoDO.getId());
companyInfoDO1.setBrandLogo(applyTagEditVO.getBrandLogo()); companyInfoDO1.setBrandLogo(applyTagEditVO.getBrandLogo());
companyInfoDO1.setRemark(applyTagEditVO.getRemark());
companyDao.updateCompanyInfo(companyInfoDO1); companyDao.updateCompanyInfo(companyInfoDO1);
return ResultBody.success(); return ResultBody.success();
} }
......
<?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.mmc.iuav.user.dao.BackUserSuggestionDao">
<resultMap id="BaseResultMap" type="com.mmc.iuav.user.entity.BackUserSuggestionDO">
<id property="id" column="id" jdbcType="INTEGER"/>
<result property="title" column="title" jdbcType="VARCHAR"/>
<result property="coverUrl" column="cover_url" jdbcType="VARCHAR"/>
<result property="suggestFile" column="suggest_file" jdbcType="VARCHAR"/>
<result property="backUserId" column="back_user_id" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
id,create_time,update_time,
title,cover_url,suggest_file,
back_user_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from back_user_suggestion
where back_user_id = #{backUserId,jdbcType=INTEGER}
</select>
<select id="countSelectSuggestion" resultType="java.lang.Integer">
select count(1)
from back_user_suggestion
where back_user_id = #{backUserId}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from back_user_suggestion
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.mmc.iuav.user.entity.BackUserSuggestionDO" useGeneratedKeys="true">
insert into back_user_suggestion
( id
,title,cover_url,suggest_file
,back_user_id)
values (#{id,jdbcType=INTEGER}
,#{title,jdbcType=VARCHAR},#{coverUrl,jdbcType=VARCHAR},#{suggestFile,jdbcType=VARCHAR}
,#{backUserId,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mmc.iuav.user.entity.BackUserSuggestionDO" useGeneratedKeys="true">
insert into back_user_suggestion
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="title != null">title,</if>
<if test="coverUrl != null">cover_url,</if>
<if test="suggestFile != null">suggest_file,</if>
<if test="backUserId != null">back_user_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id,jdbcType=INTEGER},</if>
<if test="title != null">#{title,jdbcType=VARCHAR},</if>
<if test="coverUrl != null">#{coverUrl,jdbcType=VARCHAR},</if>
<if test="suggestFile != null">#{suggestFile,jdbcType=VARCHAR},</if>
<if test="backUserId != null">#{backUserId,jdbcType=INTEGER},</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.mmc.iuav.user.entity.BackUserSuggestionDO">
update back_user_suggestion
<set>
update_time = NOW(),
<if test="title != null">
title = #{title},
</if>
<if test="coverUrl != null">
cover_url = #{coverUrl},
</if>
<if test="suggestFile != null">
suggest_file = #{suggestFile},
</if>
<if test="backUserId != null">
back_user_id = #{backUserId},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.mmc.iuav.user.entity.BackUserSuggestionDO">
update back_user_suggestion
set
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
title = #{title,jdbcType=VARCHAR},
cover_url = #{coverUrl,jdbcType=VARCHAR},
suggest_file = #{suggestFile,jdbcType=VARCHAR},
back_user_id = #{backUserId,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
...@@ -88,6 +88,9 @@ ...@@ -88,6 +88,9 @@
<if test="backImg != null"> <if test="backImg != null">
back_img = #{backImg} back_img = #{backImg}
</if> </if>
<if test="profileUrl != null">
profile_url = #{profileUrl}
</if>
</set> </set>
where where
id = #{id} id = #{id}
...@@ -119,7 +122,7 @@ ...@@ -119,7 +122,7 @@
<select id="getCompanyInfoById" resultType="com.mmc.iuav.user.entity.CompanyInfoDO"> <select id="getCompanyInfoById" resultType="com.mmc.iuav.user.entity.CompanyInfoDO">
select id, company_type, company_name, full_name, province, city, district, address, company_user_name, select id, company_type, company_name, full_name, province, city, district, address, company_user_name,
phone_num, remark, create_time, lon, lat, credit_code, license_img, brand_name, brand_logo,content, score, back_img phone_num, remark, create_time, lon, lat, credit_code, license_img, brand_name, brand_logo,content, score, back_img,profile_url
from company_info from company_info
where id = #{id} and is_deleted = 0 where id = #{id} and is_deleted = 0
</select> </select>
......
...@@ -168,6 +168,7 @@ ...@@ -168,6 +168,7 @@
ci.lon, ci.lon,
ci.content, ci.content,
ci.score, ci.score,
ci.profile_url,
cti.contract_no, cti.contract_no,
cti.sign_status cti.sign_status
FROM user_apply_tag ua FROM user_apply_tag ua
...@@ -179,6 +180,41 @@ ...@@ -179,6 +180,41 @@
AND ua.is_deleted = 0 AND ua.is_deleted = 0
</select> </select>
<select id="getUserApplyTagByCompanyId" resultMap="UserApplyTagResultMap">
SELECT ua.id,
ua.cooperation_tag_id,
ua.user_account_id,
ua.apply_name,
ua.apply_phone,
ua.apply_status,
ua.remark,
ua.create_time,
ua.order_no,
ct.tag_name,
ci.id AS company_info_id,
ci.company_name,
ci.brand_name,
ci.brand_logo,
ci.credit_code,
ci.license_img,
ci.address,
ci.lat,
ci.lon,
ci.content,
ci.score,
ci.profile_url,
cti.contract_no,
cti.sign_status
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
WHERE ci.id = #{companyInfoId}
AND ua.is_deleted = 0
</select>
<select id="getUserApplyTagByContractId" resultType="com.mmc.iuav.user.entity.UserApplyTagDO"> <select id="getUserApplyTagByContractId" resultType="com.mmc.iuav.user.entity.UserApplyTagDO">
SELECT ua.id, SELECT ua.id,
ua.cooperation_tag_id, ua.cooperation_tag_id,
......
...@@ -18,4 +18,4 @@ patches: ...@@ -18,4 +18,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: 02f43e8f62065c6a0061fbcb0503212fa974e81d newTag: 174f8a88575b013ae1c262fafad71f6a845db4bd
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论