提交 3a04cc50 作者: 张小凤

UserApply(update)

上级 209955e4
...@@ -26,7 +26,7 @@ public class UserApplyTagVO implements Serializable { ...@@ -26,7 +26,7 @@ public class UserApplyTagVO implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private Integer id; private Integer id;
@ApiModelProperty(value = "加盟标签id") @ApiModelProperty(value = "加盟标签id", example = "1")
@NotNull( @NotNull(
message = "加盟标签id不能为空", message = "加盟标签id不能为空",
groups = {Insert.class}) groups = {Insert.class})
...@@ -35,13 +35,13 @@ public class UserApplyTagVO implements Serializable { ...@@ -35,13 +35,13 @@ public class UserApplyTagVO implements Serializable {
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
private Integer userAccountId; private Integer userAccountId;
@ApiModelProperty(value = "申请人名称") @ApiModelProperty(value = "申请人名称", example = "lisi")
@NotBlank( @NotBlank(
message = "申请人名称不能为空", message = "申请人名称不能为空",
groups = {Insert.class}) groups = {Insert.class})
private String applyName; private String applyName;
@ApiModelProperty(value = "申请人手机号") @ApiModelProperty(value = "申请人手机号", example = "19892885657")
@NotBlank( @NotBlank(
message = "申请人手机号不能为空", message = "申请人手机号不能为空",
groups = {Insert.class}) groups = {Insert.class})
...@@ -70,4 +70,10 @@ public class UserApplyTagVO implements Serializable { ...@@ -70,4 +70,10 @@ public class UserApplyTagVO implements Serializable {
@ApiModelProperty(value = "服务评价⭐⭐⭐⭐⭐") @ApiModelProperty(value = "服务评价⭐⭐⭐⭐⭐")
private Integer score; private Integer score;
@ApiModelProperty(value = "品牌名称", example = "科比特")
private String brandName;
@ApiModelProperty(value = "品牌logo", example = "http://")
private String brandLogo;
} }
...@@ -14,6 +14,8 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -14,6 +14,8 @@ public enum ResultEnum implements BaseErrorInfoInterface {
BUSINESS_LICENSE_CHECK_ANALYSIS_ERROR("1000", "营业执照解析失败,请上传有效清晰的执照"), BUSINESS_LICENSE_CHECK_ANALYSIS_ERROR("1000", "营业执照解析失败,请上传有效清晰的执照"),
COMPANY_NOT_AUTH_ERROR("1001", "未进行企业认证"), COMPANY_NOT_AUTH_ERROR("1001", "未进行企业认证"),
BUSINESS_LICENSE_CHECK_PARAMETER_ERROR("1002", "企业信息与营业执照信息不一致,请重新上传"), BUSINESS_LICENSE_CHECK_PARAMETER_ERROR("1002", "企业信息与营业执照信息不一致,请重新上传"),
THE_BRAND_NAME_CANNOT_BE_EMPTY("1003", "品牌名称不能为空"),
THE_BRAND_LOGO_CANNOT_BE_EMPTY("1004", "logo图标不能为空"),
TAG_ALREADY_EXIST_ERROR("2001", "您已拥有该身份,不需要重复提交"), TAG_ALREADY_EXIST_ERROR("2001", "您已拥有该身份,不需要重复提交"),
......
...@@ -2,6 +2,7 @@ package com.mmc.iuav.user.entity; ...@@ -2,6 +2,7 @@ package com.mmc.iuav.user.entity;
import com.mmc.iuav.user.model.vo.ApplyTagEditVO; import com.mmc.iuav.user.model.vo.ApplyTagEditVO;
import com.mmc.iuav.user.model.vo.UserApplyTagVO; import com.mmc.iuav.user.model.vo.UserApplyTagVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -37,6 +38,11 @@ public class UserApplyTagDO implements Serializable { ...@@ -37,6 +38,11 @@ public class UserApplyTagDO implements Serializable {
private String name; private String name;
private Double lat; private Double lat;
private Double lon; private Double lon;
@ApiModelProperty(value = "品牌名称", example = "科比特")
private String brandName;
@ApiModelProperty(value = "品牌logo", example = "http://")
private String brandLogo;
/** /**
* 辅助字段end * 辅助字段end
...@@ -55,6 +61,8 @@ public class UserApplyTagDO implements Serializable { ...@@ -55,6 +61,8 @@ public class UserApplyTagDO implements Serializable {
.companyName(companyName) .companyName(companyName)
.content(content) .content(content)
.score(score) .score(score)
.brandName(this.brandName)
.brandLogo(this.brandLogo)
.build(); .build();
} }
...@@ -64,6 +72,8 @@ public class UserApplyTagDO implements Serializable { ...@@ -64,6 +72,8 @@ public class UserApplyTagDO implements Serializable {
this.applyName = userApplyTagVO.getApplyName(); this.applyName = userApplyTagVO.getApplyName();
this.applyPhone = userApplyTagVO.getApplyPhone(); this.applyPhone = userApplyTagVO.getApplyPhone();
this.remark = userApplyTagVO.getRemark(); this.remark = userApplyTagVO.getRemark();
this.brandLogo = userApplyTagVO.getBrandLogo();
this.brandName = userApplyTagVO.getBrandName();
} }
public ApplyTagEditVO buildApplyTagEditVO() { public ApplyTagEditVO buildApplyTagEditVO() {
......
...@@ -48,6 +48,14 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -48,6 +48,14 @@ public class CooperationServiceImpl implements CooperationService {
if (companyAuthDO == null) { if (companyAuthDO == null) {
return ResultBody.error(ResultEnum.COMPANY_NOT_AUTH_ERROR); return ResultBody.error(ResultEnum.COMPANY_NOT_AUTH_ERROR);
} }
Integer cooperationTagId = userApplyTagVO.getCooperationTagId();
if (cooperationTagId == 1 || cooperationTagId == 2) {
if ("".equals(userApplyTagVO.getBrandName()) || userApplyTagVO.getBrandName() == null) {
return ResultBody.error(ResultEnum.THE_BRAND_NAME_CANNOT_BE_EMPTY);
} else if ("".equals(userApplyTagVO.getBrandLogo()) || userApplyTagVO.getBrandLogo() == null) {
return ResultBody.error(ResultEnum.THE_BRAND_LOGO_CANNOT_BE_EMPTY);
}
}
UserApplyTagDO userApplyTagDO = new UserApplyTagDO(userApplyTagVO); UserApplyTagDO userApplyTagDO = new UserApplyTagDO(userApplyTagVO);
cooperationDao.addApply(userApplyTagDO); cooperationDao.addApply(userApplyTagDO);
List<AttachmentVO> attachmentList = userApplyTagVO.getAttachmentList(); List<AttachmentVO> attachmentList = userApplyTagVO.getAttachmentList();
......
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
<insert id="addApply" parameterType="com.mmc.iuav.user.entity.UserApplyTagDO" useGeneratedKeys="true" <insert id="addApply" parameterType="com.mmc.iuav.user.entity.UserApplyTagDO" useGeneratedKeys="true"
keyProperty="id"> keyProperty="id">
insert into user_apply_tag(cooperation_tag_id, user_account_id, apply_name, apply_phone, remark, create_time) insert into user_apply_tag(cooperation_tag_id, user_account_id, apply_name, apply_phone, remark, create_time,
values (#{cooperationTagId}, #{userAccountId}, #{applyName}, #{applyPhone}, #{remark}, NOW()) brand_name, brand_logo)
values (#{cooperationTagId}, #{userAccountId}, #{applyName}, #{applyPhone}, #{remark}, NOW(), #{brandName},
#{brandLogo})
</insert> </insert>
<insert id="insertUserTag" useGeneratedKeys="true" parameterType="com.mmc.iuav.user.entity.UserTagDO" <insert id="insertUserTag" useGeneratedKeys="true" parameterType="com.mmc.iuav.user.entity.UserTagDO"
...@@ -190,7 +192,9 @@ ...@@ -190,7 +192,9 @@
ua.content, ua.content,
ua.score, ua.score,
ct.tag_name, ct.tag_name,
ca.company_name ca.company_name,
ua.brand_name,
ua.brand_logo
FROM FROM
user_apply_tag ua user_apply_tag ua
INNER JOIN cooperation_tag ct ON ua.cooperation_tag_id = ct.id INNER JOIN cooperation_tag ct ON ua.cooperation_tag_id = ct.id
...@@ -276,4 +280,4 @@ ...@@ -276,4 +280,4 @@
from website_info from website_info
where user_apply_tag = #{id} where user_apply_tag = #{id}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论