提交 e5df45b8 作者: zhenjie

Merge branch 'develop' of ssh://git.mmcuav.cn:8222/iuav/cms into develop

 Conflicts:
	csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/CompanyInfoDO.java
......@@ -7,6 +7,7 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @Author LW
......@@ -36,4 +37,8 @@ public class ApplyTagEditVO implements Serializable {
private Double lat;
@ApiModelProperty(value = "经度")
private Double lon;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "附件")
private List<AttachmentVO> attachmentList;
}
......@@ -10,7 +10,6 @@ import java.io.Serializable;
/**
* @Author LW
*
* @date 2023/6/27 13:49 概要:
*/
@Data
......@@ -18,9 +17,12 @@ import java.io.Serializable;
@AllArgsConstructor
@Builder
public class AttachmentVO implements Serializable {
@ApiModelProperty(value = "附件url")
private String url;
@ApiModelProperty(value = "附件url")
private String url;
@ApiModelProperty(value = "附件类型:0:图片 1:文件")
private Integer type;
@ApiModelProperty(value = "附件类型:0:图片 1:文件")
private Integer type;
@ApiModelProperty(value = "")
private Integer userApplyTagId;
}
......@@ -22,27 +22,27 @@ import java.io.Serializable;
public class CompanyInfoVO implements Serializable {
private static final long serialVersionUID = 3247519744829926132L;
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = { Update.class })
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "单位类型,0科比特,1加盟公司", example = "0")
@NotNull(message = "单位类型不能为空", groups = { Insert.class })
@NotNull(message = "单位类型不能为空", groups = {Insert.class})
private Integer companyType;
@ApiModelProperty(value = "单位名称", example = "科比特")
@NotNull(message = "单位名称不能为空", groups = { Insert.class })
@NotNull(message = "单位名称不能为空", groups = {Insert.class})
private String companyName;
@ApiModelProperty(value = "单位全称", example = "浙江科比特创新科技有限公司")
private String fullName;
@ApiModelProperty(value = "省份名称", example = "广东省")
@NotNull(message = "省份名称不能为空", groups = { Insert.class })
@NotNull(message = "省份名称不能为空", groups = {Insert.class})
private String province;
@ApiModelProperty(value = "城市名称", example = "深圳市")
@NotNull(message = "城市名称不能为空", groups = { Insert.class })
@NotNull(message = "城市名称不能为空", groups = {Insert.class})
private String city;
@ApiModelProperty(value = "县区名称", example = "南山区")
@NotNull(message = "县区名称不能为空", groups = { Insert.class })
@NotNull(message = "县区名称不能为空", groups = {Insert.class})
private String district;
@ApiModelProperty(value = "详细地址", example = "西丽街道万科云城国际创新谷6栋")
@NotNull(message = "详细地址不能为空", groups = { Insert.class })
@NotNull(message = "详细地址不能为空", groups = {Insert.class})
private String address;
@ApiModelProperty(value = "联系人", example = "lx")
private String companyUserName;
......@@ -50,4 +50,12 @@ public class CompanyInfoVO implements Serializable {
private String phoneNum;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "用户id")
private Integer userAccountId;
@ApiModelProperty(value = "品牌名称", example = "科比特")
private String brandName;
@ApiModelProperty(value = "品牌logo", example = "http://")
private String brandLogo;
}
package com.mmc.iuav.user.model.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -22,13 +21,13 @@ public class CooperationTagVO implements Serializable {
private static final long serialVersionUID = 8884567706797525506L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "合作标签名称")
@ApiModelProperty(value = "合作标签名称", example = "企业名称")
private String tagName;
@ApiModelProperty(value = "合作标签img")
@ApiModelProperty(value = "合作标签img", example = "http://")
private String tagImg;
@ApiModelProperty(value = "合作标签描述")
@ApiModelProperty(value = "合作标签描述", example = "描述")
private String tagDescription;
@ApiModelProperty(value = "注意事项")
@ApiModelProperty(value = "注意事项", example = "注意事项")
private String tagRequire;
@ApiModelProperty(value = "创建时间")
private Date createTime;
......
......@@ -26,7 +26,7 @@ public class UserApplyTagVO implements Serializable {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "加盟标签id")
@ApiModelProperty(value = "加盟标签id", example = "1")
@NotNull(
message = "加盟标签id不能为空",
groups = {Insert.class})
......@@ -35,13 +35,13 @@ public class UserApplyTagVO implements Serializable {
@ApiModelProperty(value = "用户id")
private Integer userAccountId;
@ApiModelProperty(value = "申请人名称")
@ApiModelProperty(value = "申请人名称", example = "lisi")
@NotBlank(
message = "申请人名称不能为空",
groups = {Insert.class})
private String applyName;
@ApiModelProperty(value = "申请人手机号")
@ApiModelProperty(value = "申请人手机号", example = "19892885657")
@NotBlank(
message = "申请人手机号不能为空",
groups = {Insert.class})
......@@ -70,4 +70,25 @@ public class UserApplyTagVO implements Serializable {
@ApiModelProperty(value = "服务评价⭐⭐⭐⭐⭐")
private Integer score;
@ApiModelProperty(value = "品牌名称", example = "科比特")
private String brandName;
@ApiModelProperty(value = "品牌logo", example = "http://")
private String brandLogo;
@ApiModelProperty(value = "营业执照", example = "http://")
private String licenseImg;
@ApiModelProperty(value = "地址信息", example = "广东省", required = true)
@NotBlank(message = "地址信息不能为空", groups = {Insert.class})
private String address;
@ApiModelProperty(value = "纬度", example = "22.5749", required = true)
@NotNull(message = "纬度不能为空", groups = {Insert.class})
private Double lat;
@ApiModelProperty(value = "经度", example = "113.992563", required = true)
@NotNull(message = "经度不能为空", groups = {Insert.class})
private Double lon;
}
......@@ -14,6 +14,8 @@ public enum ResultEnum implements BaseErrorInfoInterface {
BUSINESS_LICENSE_CHECK_ANALYSIS_ERROR("1000", "营业执照解析失败,请上传有效清晰的执照"),
COMPANY_NOT_AUTH_ERROR("1001", "未进行企业认证"),
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", "您已拥有该身份,不需要重复提交"),
......
......@@ -50,6 +50,14 @@ public class CooperationController extends BaseController {
return cooperationService.apply(userApplyTagVO);
}
@ApiOperation(value = "app-已申请的品牌与logo列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = UserApplyTagVO.class)})
@GetMapping("appBrandList")
public ResultBody<CompanyInfoVO> appBrandList() {
return cooperationService.appBrandList();
}
@ApiOperation(value = "后台-申请列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = UserApplyTagVO.class)})
@PostMapping("listUserApplyTag")
......
......@@ -3,6 +3,7 @@ package com.mmc.iuav.user.dao;
import com.mmc.iuav.user.entity.*;
import com.mmc.iuav.user.model.qo.ApplyQO;
import com.mmc.iuav.user.model.vo.ApplyTagEditVO;
import com.mmc.iuav.user.model.vo.AttachmentVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -124,4 +125,12 @@ public interface CooperationDao {
void updateWebsiteInfo(ApplyTagEditVO applyTagEditVO);
WebsiteInfoDO getWebsiteInfoByUserApplyId(Integer id);
void deleteApplyResource(Integer id);
void insertApplyResource(List<AttachmentVO> list);
void updateCompanyInfo(UserApplyTagDO userApplyTagDO);
List<CompanyInfoDO> appBrandList();
}
......@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
......@@ -28,6 +29,8 @@ public class CompanyAuthDO implements Serializable {
private String licenseImg;
@ApiModelProperty(value = "企业认证状态,0未通过,1已通过")
private Integer authStatus;
@ApiModelProperty(value = "企业认证id")
private Integer companyInfoId;
public CompanyAuthDO(CompanyAuthVO companyAuthVO) {
this.userAccountId = companyAuthVO.getUserAccountId();
......
......@@ -2,6 +2,7 @@ package com.mmc.iuav.user.entity;
import com.mmc.iuav.user.model.vo.CompanyAuthVO;
import com.mmc.iuav.user.model.vo.CompanyInfoVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
......@@ -33,9 +34,20 @@ public class CompanyInfoDO implements Serializable {
private Double lon;
private String creditCode;
private String licenseImg;
@ApiModelProperty(value = "用户id")
private Integer userAccountId;
@ApiModelProperty(value = "品牌名称", example = "科比特")
private String brandName;
@ApiModelProperty(value = "品牌logo", example = "http://")
private String brandLogo;
public CompanyInfoVO buildCompanyInfoVO() {
return CompanyInfoVO.builder().id(id).companyType(companyType).companyName(companyName).fullName(fullName).province(province)
.brandName(brandName)
.brandLogo(brandLogo)
.userAccountId(userAccountId)
.city(city).district(district).address(address).companyUserName(companyUserName).phoneNum(phoneNum).remark(remark).build();
}
......@@ -55,5 +67,8 @@ public class CompanyInfoDO implements Serializable {
this.companyUserName = companyInfo.getCompanyUserName();
this.phoneNum = companyInfo.getPhoneNum();
this.remark = companyInfo.getRemark();
this.userAccountId = companyInfo.getUserAccountId();
this.brandName = companyInfo.getBrandName();
this.brandLogo = companyInfo.getBrandLogo();
}
}
package com.mmc.iuav.user.entity;
import com.mmc.iuav.user.model.vo.ApplyTagEditVO;
import com.mmc.iuav.user.model.vo.AttachmentVO;
import com.mmc.iuav.user.model.vo.UserApplyTagVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @author: zj @Date: 2023/5/17 21:59
......@@ -27,6 +30,8 @@ public class UserApplyTagDO implements Serializable {
private Integer applyStatus;
private String content;
private Integer score;
@ApiModelProperty(value = "企业认证id")
private Integer companyInfoId;
/**
* 辅助字段start
......@@ -37,6 +42,16 @@ public class UserApplyTagDO implements Serializable {
private String name;
private Double lat;
private Double lon;
@ApiModelProperty(value = "品牌名称", example = "科比特")
private String brandName;
@ApiModelProperty(value = "品牌logo", example = "http://")
private String brandLogo;
@ApiModelProperty(value = "营业执照", example = "http://")
private String licenseImg;
@ApiModelProperty(value = "附件", example = "http://")
private List<AttachmentVO> attachmentList;
/**
* 辅助字段end
......@@ -55,6 +70,13 @@ public class UserApplyTagDO implements Serializable {
.companyName(companyName)
.content(content)
.score(score)
.brandName(this.brandName)
.brandLogo(this.brandLogo)
.licenseImg(this.licenseImg)
.attachmentList(this.attachmentList)
.address(this.address)
.lat(this.lat)
.lon(this.lon)
.build();
}
......@@ -64,6 +86,11 @@ public class UserApplyTagDO implements Serializable {
this.applyName = userApplyTagVO.getApplyName();
this.applyPhone = userApplyTagVO.getApplyPhone();
this.remark = userApplyTagVO.getRemark();
this.brandLogo = userApplyTagVO.getBrandLogo();
this.brandName = userApplyTagVO.getBrandName();
this.address = userApplyTagVO.getAddress();
this.lon = userApplyTagVO.getLon();
this.lat = userApplyTagVO.getLat();
}
public ApplyTagEditVO buildApplyTagEditVO() {
......
......@@ -58,4 +58,6 @@ public interface CooperationService {
ResultBody editUserApplyTagDetails(Integer id);
PageResult listServiceBitmapData(Integer type, Integer pageNo, Integer pageSize, Double lon, Double lat);
ResultBody appBrandList();
}
......@@ -66,7 +66,17 @@ public class CooperationServiceImpl implements CooperationService {
if (companyAuthDO == null) {
return ResultBody.error(ResultEnum.COMPANY_NOT_AUTH_ERROR);
}
Integer cooperationTagId = userApplyTagVO.getCooperationTagId();
if (cooperationTagId == 1) {
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.setCompanyInfoId(companyAuthDO.getCompanyInfoId());
cooperationDao.addApply(userApplyTagDO);
List<AttachmentVO> attachmentList = userApplyTagVO.getAttachmentList();
for (AttachmentVO attachmentVO : attachmentList) {
......@@ -74,6 +84,8 @@ public class CooperationServiceImpl implements CooperationService {
new TagApplyResourceDO(attachmentVO, userApplyTagDO.getId());
cooperationDao.addApplyResource(tagApplyResourceDO);
}
cooperationDao.updateCompanyInfo(userApplyTagDO);
return ResultBody.success();
}
......@@ -225,7 +237,17 @@ public class CooperationServiceImpl implements CooperationService {
userApplyTagDO.setId(applyTagEditVO.getId());
userApplyTagDO.setContent(applyTagEditVO.getContent());
userApplyTagDO.setScore(applyTagEditVO.getScore());
userApplyTagDO.setRemark(applyTagEditVO.getRemark());
cooperationDao.updateUserApplyTag(userApplyTagDO);
userApplyTagDO.setAttachmentList(applyTagEditVO.getAttachmentList());
List<AttachmentVO> attachmentList = userApplyTagDO.getAttachmentList();
if (null != attachmentList) {
cooperationDao.deleteApplyResource(applyTagEditVO.getId());
if (attachmentList.size() != 0) {
cooperationDao.insertApplyResource(userApplyTagDO.getAttachmentList());
}
}
// 保存网点之前判断该网点是否存在 存在则修改不存在则新增
WebsiteInfoDO websiteInfoDO = cooperationDao.getWebsiteInfoByUserApplyId(applyTagEditVO.getId());
if (websiteInfoDO == null) {
......@@ -255,4 +277,11 @@ public class CooperationServiceImpl implements CooperationService {
.stream().map(WebsiteInfoDO::buildWebsiteRangeDTO).collect(Collectors.toList());
return PageResult.buildPage(pageNo, pageSize, count, list);
}
@Override
public ResultBody appBrandList() {
List<CompanyInfoDO> companyInfoDOS = cooperationDao.appBrandList();
List<CompanyInfoVO> collect = companyInfoDOS.stream().map(CompanyInfoDO::buildCompanyInfoVO).collect(Collectors.toList());
return ResultBody.success(collect);
}
}
......@@ -8,34 +8,34 @@ spring:
password: ${MYSQL_PASSWORD}
# Druid数据源配置
type: com.alibaba.druid.pool.DruidDataSource
# druid:
# initial-size: 10 #初始化连接池大小
# min-idle: 10 #最小大小
# max-active: 50 #最大大小
# max-wait: 60000 #获取连接时最大等待时间,单位毫秒
# time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
# min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒
# validation-query: SELECT 1 FROM DUAL #用来检测连接是否有效的sql
# test-while-idle: true #申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
# testOnBorrow: false #获取连接时执行检测,建议关闭,影响性能
# testOnReturn: false #归还连接时执行检测,建议关闭,影响性能
# pool-prepared-statements: false #是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
# filters: stat,wall #配置扩展插件,常用的插件有=>stat:监控统计 log4j:日志 wall:防御sql注入
# filter:
# wall:
# config:
# multi-statement-allow: true
# db-type: mysql
# enabled: true
# connection-properties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #打开慢sql记录和延迟时间
# web-stat-filter:
# url-pattern: /*
# exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
# enabled: true
# stat-view-servlet:
# enabled: true
# login-username: druid
# login-password: druid
# druid:
# initial-size: 10 #初始化连接池大小
# min-idle: 10 #最小大小
# max-active: 50 #最大大小
# max-wait: 60000 #获取连接时最大等待时间,单位毫秒
# time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
# min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒
# validation-query: SELECT 1 FROM DUAL #用来检测连接是否有效的sql
# test-while-idle: true #申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
# testOnBorrow: false #获取连接时执行检测,建议关闭,影响性能
# testOnReturn: false #归还连接时执行检测,建议关闭,影响性能
# pool-prepared-statements: false #是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
# filters: stat,wall #配置扩展插件,常用的插件有=>stat:监控统计 log4j:日志 wall:防御sql注入
# filter:
# wall:
# config:
# multi-statement-allow: true
# db-type: mysql
# enabled: true
# connection-properties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #打开慢sql记录和延迟时间
# web-stat-filter:
# url-pattern: /*
# exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
# enabled: true
# stat-view-servlet:
# enabled: true
# login-username: druid
# login-password: druid
redis:
database: 1
host: redis.default
......@@ -43,7 +43,7 @@ spring:
port: 6379
#rabbitMQ
rabbitmq:
host: amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.net.mq.amqp.aliyuncs.com
host: amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.vpc.mq.amqp.aliyuncs.com
port: 5672
username: MjphbXFwLWNuLXp2cDJvemhuajAwMTpMVEFJNEZ6Q3B5ckEzM1BlZ254V1M2WFY=
password: ${RABBITMQ_PASSWORD}
......
......@@ -8,34 +8,34 @@ spring:
password: ${MYSQL_PASSWORD}
# Druid数据源配置
type: com.alibaba.druid.pool.DruidDataSource
# druid:
# initial-size: 10 #初始化连接池大小
# min-idle: 10 #最小大小
# max-active: 50 #最大大小
# max-wait: 60000 #获取连接时最大等待时间,单位毫秒
# time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
# min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒
# validation-query: SELECT 1 FROM DUAL #用来检测连接是否有效的sql
# test-while-idle: true #申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
# testOnBorrow: false #获取连接时执行检测,建议关闭,影响性能
# testOnReturn: false #归还连接时执行检测,建议关闭,影响性能
# pool-prepared-statements: false #是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
# filters: stat,wall #配置扩展插件,常用的插件有=>stat:监控统计 log4j:日志 wall:防御sql注入
# filter:
# wall:
# config:
# multi-statement-allow: true
# db-type: mysql
# enabled: true
# connection-properties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #打开慢sql记录和延迟时间
# web-stat-filter:
# url-pattern: /*
# exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
# enabled: true
# stat-view-servlet:
# enabled: true
# login-username: druid
# login-password: druid
# druid:
# initial-size: 10 #初始化连接池大小
# min-idle: 10 #最小大小
# max-active: 50 #最大大小
# max-wait: 60000 #获取连接时最大等待时间,单位毫秒
# time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
# min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒
# validation-query: SELECT 1 FROM DUAL #用来检测连接是否有效的sql
# test-while-idle: true #申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
# testOnBorrow: false #获取连接时执行检测,建议关闭,影响性能
# testOnReturn: false #归还连接时执行检测,建议关闭,影响性能
# pool-prepared-statements: false #是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
# filters: stat,wall #配置扩展插件,常用的插件有=>stat:监控统计 log4j:日志 wall:防御sql注入
# filter:
# wall:
# config:
# multi-statement-allow: true
# db-type: mysql
# enabled: true
# connection-properties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #打开慢sql记录和延迟时间
# web-stat-filter:
# url-pattern: /*
# exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
# enabled: true
# stat-view-servlet:
# enabled: true
# login-username: druid
# login-password: druid
redis:
database: 5
host: redis.default
......@@ -43,7 +43,7 @@ spring:
port: 6379
#rabbitMQ
rabbitmq:
host: amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.net.mq.amqp.aliyuncs.com
host: amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.vpc.mq.amqp.aliyuncs.com
port: 5672
username: MjphbXFwLWNuLXp2cDJvemhuajAwMTpMVEFJNEZ6Q3B5ckEzM1BlZ254V1M2WFY=
password: ${RABBITMQ_PASSWORD}
......
......@@ -4,28 +4,37 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mmc.iuav.user.dao.CompanyAuthDao">
<!-- <resultMap id="companyAuthResultMAp" type="com.mmc.iuav.user.entity.CompanyAuthDO">-->
<!-- <id column="id" property="id"/>-->
<!-- <result property="authStatus" column="auth_status"/>-->
<!-- <result property="userAccountId" column="user_account_id"/>-->
<!-- <result property="companyName" column="company_name"/>-->
<!-- <result property="creditCode" column="credit_code"/>-->
<!-- <result property="licenseImg" column="license_img"/>-->
<!-- </resultMap>-->
<!-- <resultMap id="companyAuthResultMAp" type="com.mmc.iuav.user.entity.CompanyAuthDO">-->
<!-- <id column="id" property="id"/>-->
<!-- <result property="authStatus" column="auth_status"/>-->
<!-- <result property="userAccountId" column="user_account_id"/>-->
<!-- <result property="companyName" column="company_name"/>-->
<!-- <result property="creditCode" column="credit_code"/>-->
<!-- <result property="licenseImg" column="license_img"/>-->
<!-- </resultMap>-->
<insert id="addCompanyAuth" parameterType="com.mmc.iuav.user.entity.CompanyAuthDO"
keyProperty="id" useGeneratedKeys="true">
insert into company_auth(user_account_id,company_name,credit_code,license_img,auth_status,create_time)
values (#{userAccountId}, #{companyName}, #{creditCode}, #{licenseImg}, #{authStatus}, NOW())
insert into company_auth(user_account_id, company_name, credit_code, license_img, auth_status, create_time)
values (#{userAccountId}, #{companyName}, #{creditCode}, #{licenseImg}, #{authStatus}, NOW())
</insert>
<!-- <select id="getCompanyAuth" resultMap="companyAuthResultMAp">-->
<!-- select id,user_account_id,company_name,credit_code,license_img,auth_status-->
<!-- from company_auth where user_account_id = #{userAccountId}-->
<!-- </select>-->
<!-- <select id="getCompanyAuth" resultMap="companyAuthResultMAp">-->
<!-- select id,user_account_id,company_name,credit_code,license_img,auth_status-->
<!-- from company_auth where user_account_id = #{userAccountId}-->
<!-- </select>-->
<select id="getCompanyAuth" resultType="com.mmc.iuav.user.entity.CompanyAuthDO">
select id,user_account_id,company_name,credit_code,license_img,auth_status
from company_auth where user_account_id = #{userAccountId} and is_deleted = 0
SELECT cm.id,
cm.user_account_id,
cm.company_info_id,
cm.is_leader,
cm.create_time,
ci.company_name,
ci.credit_code,
ci.license_img
FROM company_member cm
LEFT JOIN company_info ci ON ci.id = cm.company_info_id
WHERE ci.is_deleted = 0
</select>
</mapper>
\ No newline at end of file
</mapper>
......@@ -4,6 +4,34 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.mmc.iuav.user.dao.CooperationDao">
<resultMap id="UserApplyTagList" type="com.mmc.iuav.user.entity.UserApplyTagDO">
<result property="id" column="id"/>
<result property="cooperationTagId" column="cooperation_tag_id"/>
<result property="userAccountId" column="user_account_id"/>
<result property="applyName" column="apply_name"/>
<result property="applyPhone" column="apply_phone"/>
<result property="applyStatus" column="apply_status"/>
<result property="remark" column="remark"/>
<result property="createTime" column="create_time"/>
<result property="content" column="content"/>
<result property="score" column="score"/>
<result property="tagName" column="tag_name"/>
<result property="companyName" column="company_name"/>
<result property="brandName" column="brand_name"/>
<result property="brandLogo" column="brand_logo"/>
<result property="licenseImg" column="license_img"/>
<result property="address" column="address"/>
<result property="lat" column="lat"/>
<result property="lon" column="lon"/>
<collection property="attachmentList" ofType="com.mmc.iuav.user.entity.TagApplyResourceDO"
select="getUserApplyResource"
column="{id=id}">
</collection>
</resultMap>
<insert id="addApply" parameterType="com.mmc.iuav.user.entity.UserApplyTagDO" useGeneratedKeys="true"
keyProperty="id">
insert into user_apply_tag(cooperation_tag_id, user_account_id, apply_name, apply_phone, remark, create_time)
......@@ -50,7 +78,7 @@
lon = #{lon},
</if>
<if test="cooperationTagId != null">
type = #{cooperationTagId}
`type` = #{cooperationTagId}
</if>
</set>
where id = #{websiteId}
......@@ -73,7 +101,7 @@
<if test="applyStatus != null">
apply_status = #{applyStatus},
</if>
<if test="remark != null">
<if test="remark != null and remark != '' ">
remark = #{remark},
</if>
<if test="content != null and content != ''">
......@@ -83,7 +111,7 @@
score = #{score}
</if>
</set>
WHERE id = #{id};
WHERE id = #{id}
</update>
<update id="updateUserTag">
......@@ -177,7 +205,9 @@
</if>
</where>
</select>
<select id="listUserApplyTag" resultType="com.mmc.iuav.user.entity.UserApplyTagDO">
<select id="listUserApplyTag" resultMap="UserApplyTagList">
SELECT
ua.id,
ua.cooperation_tag_id,
......@@ -190,11 +220,19 @@
ua.content,
ua.score,
ct.tag_name,
ca.company_name
ci.company_name,
ci.brand_name,
ci.brand_logo,
ci.credit_code,
ci.license_img,
ci.address,
ci.lat,
ci.lon
FROM
user_apply_tag ua
INNER JOIN cooperation_tag ct ON ua.cooperation_tag_id = ct.id
INNER JOIN company_auth ca ON ca.user_account_id = ua.user_account_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
<where>
ua.is_deleted = 0
<if test="cooperationTagId != null">
......@@ -210,7 +248,7 @@
and ua.create_time &lt;= #{endTime}
</if>
<if test="companyName != null and companyName != ''">
and ca.company_name like CONCAT("%",#{companyName},"%")
and ci.company_name like CONCAT("%",#{companyName},"%")
</if>
</where>
order by ua.create_time desc
......@@ -276,4 +314,57 @@
from website_info
where user_apply_tag = #{id}
</select>
</mapper>
\ No newline at end of file
<delete id="deleteApplyResource" parameterType="java.lang.Integer">
DELETE
FROM tag_apply_resource
WHERE user_apply_tag_id = #{id}
</delete>
<insert id="insertApplyResource">
INSERT INTO tag_apply_resource(user_apply_tag_id,url,`type`,create_time,update_time) VALUES
<foreach collection="list" separator="," item="item">
(#{item.userApplyTagId},#{item.url},#{item.type},NOW(),NOW())
</foreach>
</insert>
<update id="updateCompanyInfo"
parameterType="com.mmc.iuav.user.entity.UserApplyTagDO">
UPDATE company_info
<set>
<if test=" lat != null and lat != '' ">
lat = #{lat},
</if>
<if test=" lon != null and lon != '' ">
lon = #{lon},
</if>
<if test=" address != null and address != '' ">
address = #{address},
</if>
<if test=" brandName != null and brandName != '' ">
brand_name = #{brandName},
</if>
<if test=" brandLogo != null and brandLogo != '' ">
brand_logo = #{brandLogo},
</if>
update_time=NOW()
</set>
where id = #{companyInfoId}
</update>
<select id="appBrandList" resultType="com.mmc.iuav.user.entity.CompanyInfoDO">
SELECT cm.user_account_id,
cm.company_info_id,
cm.is_leader,
ci.brand_name,
ci.brand_logo,
ci.address,
ci.lon,
ci.lat,
ci.company_name,
ci.id
FROM company_member cm
LEFT JOIN company_info ci ON cm.company_info_id = ci.id
</select>
</mapper>
......@@ -22,3 +22,4 @@ data-filter:
- /userapp/company/listCompanyPageBack
- /userapp/company/getCompanyInfoById
- /userapp/cooperation/service/bitmap
- /userapp/cooperation/appBrandList
......@@ -18,4 +18,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: 8f9846a81bfe03e2e6d2e7e18b1af994e0fdd75f
newTag: 4b81f81db3cbd4d01b4d0d35d3fb09a99ef8d1df
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论