提交 049ecd66 作者: zhenjie

单位、加盟修改、优化

上级 484bb7d5
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId> <artifactId>protobuf-java</artifactId>
<version>3.11.4</version> <version>3.16.3</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
......
...@@ -68,4 +68,8 @@ public class CompanyInfoVO implements Serializable { ...@@ -68,4 +68,8 @@ public class CompanyInfoVO implements Serializable {
private String brandLogo; private String brandLogo;
@ApiModelProperty(value = "管理员标识") @ApiModelProperty(value = "管理员标识")
private Integer leader; private Integer leader;
@ApiModelProperty(value = "服务资质信息", example = "5星店铺")
private String content;
@ApiModelProperty(value = "评分", example = "*****")
private Integer score;
} }
...@@ -57,6 +57,13 @@ public class CompanyController extends BaseController { ...@@ -57,6 +57,13 @@ public class CompanyController extends BaseController {
return companyService.getCompanyInfoById(id); return companyService.getCompanyInfoById(id);
} }
@ApiOperation(value = "pc-后台用户id单位查询")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = CompanyInfoVO.class)})
@GetMapping("getCompanyInfoByBUId")
public ResultBody<CompanyInfoVO> getCompanyInfoByBUId(@RequestParam Integer backUserAccountId) {
return companyService.getCompanyInfoByBUId(backUserAccountId);
}
@ApiOperation(value = "单位列表") @ApiOperation(value = "单位列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = CompanyInfoVO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = CompanyInfoVO.class)})
@PostMapping("listCompanyPage") @PostMapping("listCompanyPage")
......
...@@ -65,7 +65,6 @@ public class CooperationController extends BaseController { ...@@ -65,7 +65,6 @@ public class CooperationController extends BaseController {
return cooperationService.appBrandMessage(userAccountId); return cooperationService.appBrandMessage(userAccountId);
} }
@ApiOperation(value = "后台-申请列表") @ApiOperation(value = "后台-申请列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = UserApplyTagVO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = UserApplyTagVO.class)})
@PostMapping("listUserApplyTag") @PostMapping("listUserApplyTag")
...@@ -98,7 +97,7 @@ public class CooperationController extends BaseController { ...@@ -98,7 +97,7 @@ public class CooperationController extends BaseController {
return ResultBody.success(cooperationService.listServiceBitmapData(type, pageNo, pageSize, lon, lat)); return ResultBody.success(cooperationService.listServiceBitmapData(type, pageNo, pageSize, lon, lat));
} }
@ApiOperation(value = "强制删除") @ApiOperation(value = "强制删除加盟商标签")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("deleteApplyTag") @GetMapping("deleteApplyTag")
public ResultBody deleteApplyTag(Integer id) { public ResultBody deleteApplyTag(Integer id) {
......
package com.mmc.iuav.user.entity; package com.mmc.iuav.user.entity;
import com.mmc.iuav.user.model.vo.ApplyTagEditVO;
import com.mmc.iuav.user.model.vo.CompanyAuthVO; import com.mmc.iuav.user.model.vo.CompanyAuthVO;
import com.mmc.iuav.user.model.vo.CompanyInfoVO; import com.mmc.iuav.user.model.vo.CompanyInfoVO;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -42,16 +43,31 @@ public class CompanyInfoDO implements Serializable { ...@@ -42,16 +43,31 @@ public class CompanyInfoDO implements Serializable {
@ApiModelProperty(value = "品牌logo", example = "http://") @ApiModelProperty(value = "品牌logo", example = "http://")
private String brandLogo; private String brandLogo;
@ApiModelProperty(value = "服务资质信息", example = "5星店铺")
private String content;
@ApiModelProperty(value = "评分", example = "*****")
private Integer score;
private Integer leader; private Integer leader;
public CompanyInfoDO(ApplyTagEditVO applyTagEditVO) {
this.address = applyTagEditVO.getAddress();
this.lon = applyTagEditVO.getLon();
this.lat = applyTagEditVO.getLat();
this.content = applyTagEditVO.getContent();
this.score = applyTagEditVO.getScore();
}
public CompanyInfoVO buildCompanyInfoVO() { public CompanyInfoVO buildCompanyInfoVO() {
return CompanyInfoVO.builder().id(id).companyType(companyType).companyName(companyName).fullName(fullName).province(province) return CompanyInfoVO.builder().id(id).companyType(companyType).companyName(companyName).fullName(fullName).province(province)
.brandName(brandName) .brandName(brandName)
.brandLogo(brandLogo) .brandLogo(brandLogo)
.userAccountId(userAccountId) .userAccountId(userAccountId)
.lon(this.lon).lat(this.lat).creditCode(this.creditCode).licenseImg(this.licenseImg).leader(this.leader) .lon(this.lon).lat(this.lat).creditCode(this.creditCode).licenseImg(this.licenseImg).leader(this.leader)
.city(city).district(district).address(address).companyUserName(companyUserName).phoneNum(phoneNum).remark(remark).build(); .city(city).district(district).address(address).companyUserName(companyUserName).phoneNum(phoneNum).remark(remark)
.content(this.getContent())
.score(this.getScore())
.build();
} }
public CompanyAuthVO buildCompanyAuthVO() { public CompanyAuthVO buildCompanyAuthVO() {
...@@ -75,5 +91,7 @@ public class CompanyInfoDO implements Serializable { ...@@ -75,5 +91,7 @@ public class CompanyInfoDO implements Serializable {
this.brandLogo = companyInfo.getBrandLogo(); this.brandLogo = companyInfo.getBrandLogo();
this.lon = companyInfo.getLon(); this.lon = companyInfo.getLon();
this.lat = companyInfo.getLat(); this.lat = companyInfo.getLat();
this.content = companyInfo.getContent();
this.score = companyInfo.getScore();
} }
} }
...@@ -28,28 +28,14 @@ public class UserApplyTagDO implements Serializable { ...@@ -28,28 +28,14 @@ public class UserApplyTagDO implements Serializable {
private String remark; private String remark;
private Date createTime; private Date createTime;
private Integer applyStatus; private Integer applyStatus;
private String content;
private Integer score;
@ApiModelProperty(value = "企业认证id")
private Integer companyInfoId;
/** /**
* 辅助字段start * 辅助字段start
*/ */
@ApiModelProperty(value = "申请品牌")
private String tagName; private String tagName;
private String companyName; @ApiModelProperty(value = "用户认证企业")
private String address; private CompanyInfoDO companyInfoDO;
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://") @ApiModelProperty(value = "附件", example = "http://")
private List<AttachmentVO> attachmentList; private List<AttachmentVO> attachmentList;
...@@ -67,16 +53,16 @@ public class UserApplyTagDO implements Serializable { ...@@ -67,16 +53,16 @@ public class UserApplyTagDO implements Serializable {
.applyTime(createTime) .applyTime(createTime)
.approvalStatus(applyStatus) .approvalStatus(applyStatus)
.cooperationTagName(tagName) .cooperationTagName(tagName)
.companyName(companyName)
.content(content)
.score(score)
.brandName(this.brandName)
.brandLogo(this.brandLogo)
.licenseImg(this.licenseImg)
.attachmentList(this.attachmentList) .attachmentList(this.attachmentList)
.address(this.address) .content(this.companyInfoDO == null ? null : this.companyInfoDO.getContent())
.lat(this.lat) .score(this.companyInfoDO == null ? null : this.companyInfoDO.getScore())
.lon(this.lon) .companyName(this.companyInfoDO == null ? null : this.companyInfoDO.getCompanyName())
.brandName(this.companyInfoDO == null ? null : this.companyInfoDO.getBrandName())
.brandLogo(this.companyInfoDO == null ? null : this.companyInfoDO.getBrandLogo())
.licenseImg(this.companyInfoDO == null ? null : this.companyInfoDO.getLicenseImg())
.address(this.companyInfoDO == null ? null : this.companyInfoDO.getAddress())
.lat(this.companyInfoDO == null ? null : this.companyInfoDO.getLat())
.lon(this.companyInfoDO == null ? null : this.companyInfoDO.getLon())
.build(); .build();
} }
...@@ -86,18 +72,16 @@ public class UserApplyTagDO implements Serializable { ...@@ -86,18 +72,16 @@ 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();
this.address = userApplyTagVO.getAddress();
this.lon = userApplyTagVO.getLon();
this.lat = userApplyTagVO.getLat();
} }
public ApplyTagEditVO buildApplyTagEditVO() { public ApplyTagEditVO buildApplyTagEditVO() {
return ApplyTagEditVO.builder().id(id) return ApplyTagEditVO.builder().id(id)
.cooperationTagId(cooperationTagId).name(name) .cooperationTagId(cooperationTagId).name(this.companyInfoDO == null ? null : this.companyInfoDO.getCompanyName())
.address(address).lat(lat).lon(lon) .address(this.companyInfoDO == null ? null : this.companyInfoDO.getAddress())
.content(content).score(score) .lat(this.companyInfoDO == null ? null : this.companyInfoDO.getLat())
.lon(this.companyInfoDO == null ? null : this.companyInfoDO.getLon())
.content(this.companyInfoDO == null ? null : this.companyInfoDO.getContent())
.score(this.companyInfoDO == null ? null : this.companyInfoDO.getScore())
.build(); .build();
} }
} }
...@@ -145,4 +145,6 @@ public interface CompanyService { ...@@ -145,4 +145,6 @@ public interface CompanyService {
* @return * @return
*/ */
ResultBody listCompanyMembers(Integer companyInfoId, LoginSuccessDTO userLoginInfoFromRedis, Integer pageNo, Integer pageSize); ResultBody listCompanyMembers(Integer companyInfoId, LoginSuccessDTO userLoginInfoFromRedis, Integer pageNo, Integer pageSize);
ResultBody<CompanyInfoVO> getCompanyInfoByBUId(Integer backUserAccountId);
} }
...@@ -100,7 +100,7 @@ public class AuthServiceImpl implements AuthService { ...@@ -100,7 +100,7 @@ public class AuthServiceImpl implements AuthService {
userAccountDO.setSource(wxLoginVO.getSource()); userAccountDO.setSource(wxLoginVO.getSource());
userAccountService.insertUserAccount(userAccountDO); userAccountService.insertUserAccount(userAccountDO);
userAccountVO = userAccountDO.buildUserAccountVO(); userAccountVO = userAccountDO.buildUserAccountVO();
payClient.createWallet(userAccountDO.getId()); //payClient.createWallet(userAccountDO.getId());
// 查询之前有没有实名过 // 查询之前有没有实名过
RealNameAuthDO nameAuthByUnionId = realNameAuthDao.getRealNameAuthBakByUnionId(unionId); RealNameAuthDO nameAuthByUnionId = realNameAuthDao.getRealNameAuthBakByUnionId(unionId);
if (nameAuthByUnionId != null) { if (nameAuthByUnionId != null) {
...@@ -123,6 +123,9 @@ public class AuthServiceImpl implements AuthService { ...@@ -123,6 +123,9 @@ public class AuthServiceImpl implements AuthService {
stringRedisTemplate.opsForValue().set( stringRedisTemplate.opsForValue().set(
token, JSONObject.toJSONString(loginSuccessDTO), token, JSONObject.toJSONString(loginSuccessDTO),
JwtConstant.EXPIRATION, TimeUnit.MILLISECONDS); JwtConstant.EXPIRATION, TimeUnit.MILLISECONDS);
if (1 == 1) {
throw new RuntimeException();
}
return ResultBody.success(AppUserSucVO.builder().token(token).uid(userAccountVO.getUid()).phoneNum(userAccountVO.getPhoneNum()) return ResultBody.success(AppUserSucVO.builder().token(token).uid(userAccountVO.getUid()).phoneNum(userAccountVO.getPhoneNum())
.nickName(userAccountVO.getNickName()).userAccountId(userAccountVO.getId()).sessionKey(sessionKey).portType(100).authStatus(companyAuthStatus).build()); .nickName(userAccountVO.getNickName()).userAccountId(userAccountVO.getId()).sessionKey(sessionKey).portType(100).authStatus(companyAuthStatus).build());
......
...@@ -203,4 +203,15 @@ public class CompanyServiceImpl implements CompanyService { ...@@ -203,4 +203,15 @@ public class CompanyServiceImpl implements CompanyService {
List<UserAccountVO> userAccountVOS = userAccountDOS.stream().map(UserAccountDO::buildUserAccountVO).collect(Collectors.toList()); List<UserAccountVO> userAccountVOS = userAccountDOS.stream().map(UserAccountDO::buildUserAccountVO).collect(Collectors.toList());
return ResultBody.success(PageResult.buildPage(pageNo, pageSize, count, userAccountVOS)); return ResultBody.success(PageResult.buildPage(pageNo, pageSize, count, userAccountVOS));
} }
@Override
public ResultBody<CompanyInfoVO> getCompanyInfoByBUId(Integer backUserAccountId) {
// 获取公司id
CompanyInfoDO companyInfoDO = companyDao.getCompanyInfoByBackUserAccountId(backUserAccountId);
if (companyInfoDO != null) {
companyInfoDO.setLicenseImg(null);
return ResultBody.success(companyInfoDO.buildCompanyInfoVO());
}
return ResultBody.success();
}
} }
...@@ -69,8 +69,8 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -69,8 +69,8 @@ public class CooperationServiceImpl implements CooperationService {
return ResultBody.error(ResultEnum.TAG_ALREADY_EXIST_ERROR); return ResultBody.error(ResultEnum.TAG_ALREADY_EXIST_ERROR);
} }
// 判断企业认证 // 判断企业认证
CompanyAuthDO companyAuthDO = companyAuthDao.getCompanyAuth(userApplyTagVO.getUserAccountId()); CompanyInfoDO appCompanyInfoUId = companyDao.getAppCompanyInfoUId(userApplyTagVO.getUserAccountId());
if (companyAuthDO == null) { if (appCompanyInfoUId == null) {
return ResultBody.error(ResultEnum.COMPANY_NOT_AUTH_ERROR); return ResultBody.error(ResultEnum.COMPANY_NOT_AUTH_ERROR);
} }
Integer cooperationTagId = userApplyTagVO.getCooperationTagId(); Integer cooperationTagId = userApplyTagVO.getCooperationTagId();
...@@ -81,9 +81,7 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -81,9 +81,7 @@ public class CooperationServiceImpl implements CooperationService {
return ResultBody.error(ResultEnum.THE_BRAND_LOGO_CANNOT_BE_EMPTY); return ResultBody.error(ResultEnum.THE_BRAND_LOGO_CANNOT_BE_EMPTY);
} }
} }
UserApplyTagDO userApplyTagDO = new UserApplyTagDO(userApplyTagVO); UserApplyTagDO userApplyTagDO = new UserApplyTagDO(userApplyTagVO);
userApplyTagDO.setCompanyInfoId(companyAuthDO.getCompanyInfoId());
cooperationDao.addApply(userApplyTagDO); cooperationDao.addApply(userApplyTagDO);
List<AttachmentVO> attachmentList = userApplyTagVO.getAttachmentList(); List<AttachmentVO> attachmentList = userApplyTagVO.getAttachmentList();
for (AttachmentVO attachmentVO : attachmentList) { for (AttachmentVO attachmentVO : attachmentList) {
...@@ -91,8 +89,13 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -91,8 +89,13 @@ public class CooperationServiceImpl implements CooperationService {
new TagApplyResourceDO(attachmentVO, userApplyTagDO.getId()); new TagApplyResourceDO(attachmentVO, userApplyTagDO.getId());
cooperationDao.addApplyResource(tagApplyResourceDO); cooperationDao.addApplyResource(tagApplyResourceDO);
} }
// 修改单位的位置、品牌信息
cooperationDao.updateCompanyInfo(userApplyTagDO); appCompanyInfoUId.setLon(userApplyTagVO.getLon());
appCompanyInfoUId.setLat(userApplyTagVO.getLat());
appCompanyInfoUId.setAddress(userApplyTagVO.getAddress());
appCompanyInfoUId.setBrandLogo(userApplyTagVO.getBrandLogo());
appCompanyInfoUId.setBrandName(userApplyTagVO.getBrandName());
companyDao.updateCompanyInfo(appCompanyInfoUId);
return ResultBody.success(); return ResultBody.success();
} }
...@@ -144,7 +147,7 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -144,7 +147,7 @@ public class CooperationServiceImpl implements CooperationService {
// 初始化返回对象 // 初始化返回对象
UserApplyTagDetailsVO userApplyTagDetailsVO = new UserApplyTagDetailsVO(); UserApplyTagDetailsVO userApplyTagDetailsVO = new UserApplyTagDetailsVO();
// 获取企业认证信息 // 获取企业认证信息
CompanyAuthDO companyAuthDO = companyAuthDao.getCompanyAuth(userAccountId); CompanyInfoDO companyInfoDO = companyDao.getAppCompanyInfoUId(userAccountId);
// 获取申请信息 // 获取申请信息
UserApplyTagDO userApplyTag = cooperationDao.getUserApplyTag(id); UserApplyTagDO userApplyTag = cooperationDao.getUserApplyTag(id);
// 获取附件信息 // 获取附件信息
...@@ -156,9 +159,9 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -156,9 +159,9 @@ public class CooperationServiceImpl implements CooperationService {
.collect(Collectors.toList()); .collect(Collectors.toList());
userApplyTagDetailsVO.setAttachmentList(list); userApplyTagDetailsVO.setAttachmentList(list);
} }
userApplyTagDetailsVO.setCompanyName(companyAuthDO.getCompanyName()); userApplyTagDetailsVO.setCompanyName(companyInfoDO.getCompanyName());
userApplyTagDetailsVO.setLicenseImg(companyAuthDO.getLicenseImg()); userApplyTagDetailsVO.setLicenseImg(companyInfoDO.getLicenseImg());
userApplyTagDetailsVO.setCreditCode(companyAuthDO.getCreditCode()); userApplyTagDetailsVO.setCreditCode(companyInfoDO.getCreditCode());
userApplyTagDetailsVO.setRemark(userApplyTag.getRemark()); userApplyTagDetailsVO.setRemark(userApplyTag.getRemark());
return ResultBody.success(userApplyTagDetailsVO); return ResultBody.success(userApplyTagDetailsVO);
} }
...@@ -255,8 +258,6 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -255,8 +258,6 @@ public class CooperationServiceImpl implements CooperationService {
// 编辑服务商信息 // 编辑服务商信息
UserApplyTagDO userApplyTagDO = new UserApplyTagDO(); UserApplyTagDO userApplyTagDO = new UserApplyTagDO();
userApplyTagDO.setId(applyTagEditVO.getId()); userApplyTagDO.setId(applyTagEditVO.getId());
userApplyTagDO.setContent(applyTagEditVO.getContent());
userApplyTagDO.setScore(applyTagEditVO.getScore());
userApplyTagDO.setRemark(applyTagEditVO.getRemark()); userApplyTagDO.setRemark(applyTagEditVO.getRemark());
cooperationDao.updateUserApplyTag(userApplyTagDO); cooperationDao.updateUserApplyTag(userApplyTagDO);
userApplyTagDO.setAttachmentList(applyTagEditVO.getAttachmentList()); userApplyTagDO.setAttachmentList(applyTagEditVO.getAttachmentList());
...@@ -268,16 +269,11 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -268,16 +269,11 @@ public class CooperationServiceImpl implements CooperationService {
cooperationDao.insertApplyResource(userApplyTagDO.getAttachmentList()); cooperationDao.insertApplyResource(userApplyTagDO.getAttachmentList());
} }
} }
// 保存网点之前判断该网点是否存在 存在则修改不存在则新增 // 修改单位网点位置信息
WebsiteInfoDO websiteInfoDO = cooperationDao.getWebsiteInfoByUserApplyId(applyTagEditVO.getId()); CompanyInfoDO companyInfoDO = companyDao.getAppCompanyInfoUId(userApplyTag.getUserAccountId());
if (websiteInfoDO == null) { CompanyInfoDO companyInfoDO1 = new CompanyInfoDO(applyTagEditVO);
// 保存网点信息 companyInfoDO1.setId(companyInfoDO.getId());
cooperationDao.addWebsiteInfo(applyTagEditVO); companyDao.updateCompanyInfo(companyInfoDO1);
} else {
applyTagEditVO.setWebsiteId(websiteInfoDO.getId());
// 修改网点信息
cooperationDao.updateWebsiteInfo(applyTagEditVO);
}
return ResultBody.success(); return ResultBody.success();
} }
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<update id="removeCompanyInfo"> <update id="removeCompanyInfo">
update company_info set is_deleted = 1 where id = #{id} update company_info set is_deleted = 1 where id = #{id}
</update> </update>
<update id="updateCompanyInfo"> <update id="updateCompanyInfo" parameterType="com.mmc.iuav.user.entity.CompanyInfoDO">
update company_info update company_info
<set> <set>
<if test="companyType != null"> <if test="companyType != null">
...@@ -62,7 +62,25 @@ ...@@ -62,7 +62,25 @@
phone_num = #{phoneNum}, phone_num = #{phoneNum},
</if> </if>
<if test="remark != null"> <if test="remark != null">
remark = #{remark} remark = #{remark},
</if>
<if test="content != null">
content = #{content},
</if>
<if test="score != null">
score = #{score}
</if>
<if test="brandLogo != null">
brand_logo = #{brandLogo},
</if>
<if test="brandName != null">
brand_name = #{brandName},
</if>
<if test="licenseImg != null">
license_img = #{licenseImg},
</if>
<if test="creditCode != null">
credit_code = #{creditCode}
</if> </if>
</set> </set>
where where
...@@ -83,7 +101,7 @@ ...@@ -83,7 +101,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 phone_num, remark, create_time, lon, lat, credit_code, license_img, brand_name, brand_logo,content, score
from company_info from company_info
where id = #{id} and is_deleted = 0 where id = #{id} and is_deleted = 0
</select> </select>
...@@ -103,7 +121,7 @@ ...@@ -103,7 +121,7 @@
<select id="listCompanyPage" resultType="com.mmc.iuav.user.entity.CompanyInfoDO" <select id="listCompanyPage" resultType="com.mmc.iuav.user.entity.CompanyInfoDO"
parameterType="com.mmc.iuav.user.model.qo.CompanyInfoQO"> parameterType="com.mmc.iuav.user.model.qo.CompanyInfoQO">
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 phone_num, remark, create_time, lon, lat, credit_code, license_img, brand_name, brand_logo,content, score
from company_info from company_info
where is_deleted = 0 where is_deleted = 0
<if test="companyName != null"> <if test="companyName != null">
...@@ -118,7 +136,7 @@ ...@@ -118,7 +136,7 @@
<select id="getCompanyInfoByBackUserAccountId" resultType="com.mmc.iuav.user.entity.CompanyInfoDO"> <select id="getCompanyInfoByBackUserAccountId" resultType="com.mmc.iuav.user.entity.CompanyInfoDO">
SELECT ci.id, ci.company_type, ci.company_name, ci.full_name, ci.province, ci.city, ci.district, ci.address, ci.company_user_name, SELECT ci.id, ci.company_type, ci.company_name, ci.full_name, ci.province, ci.city, ci.district, ci.address, ci.company_user_name,
ci.phone_num, ci.remark, ci.create_time,ci.brand_logo, ci.brand_name, ci.license_img, ci.credit_code ci.phone_num, ci.remark, ci.create_time,ci.brand_logo, ci.brand_name, ci.license_img, ci.credit_code, ci.content, ci.score
FROM company_info ci INNER JOIN company_back_user cbu ON ci.id = cbu.company_info_id FROM company_info ci INNER JOIN company_back_user cbu ON ci.id = cbu.company_info_id
WHERE cbu.back_user_account_id = #{backUserAccountId} and ci.is_deleted = 0 WHERE cbu.back_user_account_id = #{backUserAccountId} and ci.is_deleted = 0
</select> </select>
...@@ -133,7 +151,7 @@ ...@@ -133,7 +151,7 @@
<select id="listCompanyInfoByUID" resultType="com.mmc.iuav.user.entity.CompanyInfoDO"> <select id="listCompanyInfoByUID" resultType="com.mmc.iuav.user.entity.CompanyInfoDO">
SELECT ci.id, ci.company_type, ci.company_name, ci.full_name, ci.province, ci.city, ci.district, ci.address, SELECT ci.id, ci.company_type, ci.company_name, ci.full_name, ci.province, ci.city, ci.district, ci.address,
ci.company_user_name, ci.company_user_name,
ci.phone_num, ci.remark, ci.create_time, cbu.back_user_account_id ci.phone_num, ci.remark, ci.create_time, cbu.back_user_account_id,ci.content, ci.score
FROM company_info ci INNER JOIN company_back_user cbu ON ci.id = cbu.company_info_id FROM company_info ci INNER JOIN company_back_user cbu ON ci.id = cbu.company_info_id
WHERE ci.is_deleted = 0 WHERE ci.is_deleted = 0
<if test="backUserIds != null"> <if test="backUserIds != null">
...@@ -153,7 +171,7 @@ ...@@ -153,7 +171,7 @@
</select> </select>
<select id="getCompanyInfoByName" resultType="com.mmc.iuav.user.entity.CompanyInfoDO"> <select id="getCompanyInfoByName" resultType="com.mmc.iuav.user.entity.CompanyInfoDO">
select id, company_type, company_name, full_name, province, city, district, address, company_user_name, phone_num, remark, create_time select id, company_type, company_name, full_name, province, city, district, address, company_user_name, phone_num, remark, create_time, content, score
from company_info from company_info
where company_name = #{companyName} and is_deleted = 0 where company_name = #{companyName} and is_deleted = 0
</select> </select>
...@@ -171,7 +189,8 @@ ...@@ -171,7 +189,8 @@
ci.license_img, ci.license_img,
ci.brand_name, ci.brand_name,
ci.brand_logo, ci.brand_logo,
cm.is_leader as leader cm.is_leader as leader,
ci.content, ci.score
FROM FROM
company_info ci company_info ci
INNER JOIN company_member cm ON ci.id = cm.company_info_id INNER JOIN company_member cm ON ci.id = cm.company_info_id
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<mapper namespace="com.mmc.iuav.user.dao.CooperationDao"> <mapper namespace="com.mmc.iuav.user.dao.CooperationDao">
<resultMap id="UserApplyTagList" type="com.mmc.iuav.user.entity.UserApplyTagDO"> <resultMap id="UserApplyTagResultMap" type="com.mmc.iuav.user.entity.UserApplyTagDO">
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="cooperationTagId" column="cooperation_tag_id"/> <result property="cooperationTagId" column="cooperation_tag_id"/>
<result property="userAccountId" column="user_account_id"/> <result property="userAccountId" column="user_account_id"/>
...@@ -14,16 +14,20 @@ ...@@ -14,16 +14,20 @@
<result property="applyStatus" column="apply_status"/> <result property="applyStatus" column="apply_status"/>
<result property="remark" column="remark"/> <result property="remark" column="remark"/>
<result property="createTime" column="create_time"/> <result property="createTime" column="create_time"/>
<result property="content" column="content"/>
<result property="score" column="score"/>
<result property="tagName" column="tag_name"/> <result property="tagName" column="tag_name"/>
<result property="companyName" column="company_name"/>
<result property="brandName" column="brand_name"/> <association property="companyInfoDO" javaType="com.mmc.iuav.user.entity.CompanyInfoDO">
<result property="brandLogo" column="brand_logo"/> <id property="id" column="company_info_id"/>
<result property="licenseImg" column="license_img"/> <result property="companyName" column="company_name"/>
<result property="address" column="address"/> <result property="brandName" column="brand_name"/>
<result property="lat" column="lat"/> <result property="brandLogo" column="brand_logo"/>
<result property="lon" column="lon"/> <result property="licenseImg" column="license_img"/>
<result property="address" column="address"/>
<result property="lat" column="lat"/>
<result property="lon" column="lon"/>
<result property="content" column="content"/>
<result property="score" column="score"/>
</association>
<collection property="attachmentList" ofType="com.mmc.iuav.user.entity.TagApplyResourceDO" <collection property="attachmentList" ofType="com.mmc.iuav.user.entity.TagApplyResourceDO"
select="getUserApplyResource" select="getUserApplyResource"
column="{id=id}"> column="{id=id}">
...@@ -145,23 +149,27 @@ ...@@ -145,23 +149,27 @@
where is_deleted = 0 where is_deleted = 0
</select> </select>
<select id="getUserApplyTag" resultType="com.mmc.iuav.user.entity.UserApplyTagDO"> <select id="getUserApplyTag" resultMap="UserApplyTagResultMap">
SELECT ua.id, SELECT
ua.cooperation_tag_id, ua.id,
ua.user_account_id, ua.cooperation_tag_id,
ua.apply_name, ua.user_account_id,
ua.apply_phone, ua.apply_name,
ua.apply_status, ua.apply_phone,
ua.remark, ua.apply_status,
ua.content, ua.remark,
ua.score, ua.create_time,
ua.create_time, ci.id as company_info_id,
wi.address, ci.address,
wi.`name`, ci.company_name AS `name`,
wi.lat, ci.lat,
wi.lon ci.lon,
FROM user_apply_tag ua ci.content,
LEFT JOIN website_info wi ON ua.id = wi.user_apply_tag ci.score
FROM
user_apply_tag ua
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.id = #{id} WHERE ua.id = #{id}
AND ua.is_deleted = 0 AND ua.is_deleted = 0
</select> </select>
...@@ -183,9 +191,11 @@ ...@@ -183,9 +191,11 @@
</select> </select>
<select id="countListUserApplyTag" resultType="java.lang.Integer"> <select id="countListUserApplyTag" resultType="java.lang.Integer">
select count(*) select count(*)
from user_apply_tag ua from
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
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> <where>
ua.is_deleted = 0 ua.is_deleted = 0
<if test="cooperationTagId != null"> <if test="cooperationTagId != null">
...@@ -201,13 +211,13 @@ ...@@ -201,13 +211,13 @@
and ua.create_time &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d %H:%i:%s') and ua.create_time &lt;= STR_TO_DATE(#{endTime},'%Y-%m-%d %H:%i:%s')
</if> </if>
<if test="companyName != null and companyName != ''"> <if test="companyName != null and companyName != ''">
and ca.company_name like CONCAT("%",#{companyName},"%") and ci.company_name like CONCAT("%",#{companyName},"%")
</if> </if>
</where> </where>
</select> </select>
<select id="listUserApplyTag" resultMap="UserApplyTagList"> <select id="listUserApplyTag" resultMap="UserApplyTagResultMap">
SELECT SELECT
ua.id, ua.id,
ua.cooperation_tag_id, ua.cooperation_tag_id,
...@@ -217,9 +227,8 @@ ...@@ -217,9 +227,8 @@
ua.apply_status, ua.apply_status,
ua.remark, ua.remark,
ua.create_time, ua.create_time,
ua.content,
ua.score,
ct.tag_name, ct.tag_name,
ci.id as company_info_id,
ci.company_name, ci.company_name,
ci.brand_name, ci.brand_name,
ci.brand_logo, ci.brand_logo,
...@@ -227,7 +236,9 @@ ...@@ -227,7 +236,9 @@
ci.license_img, ci.license_img,
ci.address, ci.address,
ci.lat, ci.lat,
ci.lon ci.lon,
ci.content,
ci.score
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
...@@ -280,9 +291,11 @@ ...@@ -280,9 +291,11 @@
</if> </if>
</select> </select>
<select id="countServiceBitmapData" resultType="java.lang.Integer"> <select id="countServiceBitmapData" resultType="java.lang.Integer">
select count(*) SELECT count(*)
from website_info FROM
where type = #{type} user_apply_tag uat
INNER JOIN cooperation_tag ct ON uat.cooperation_tag_id = ct.id
WHERE ct.id = #{type}
</select> </select>
<select id="listServiceBitmapData" resultType="com.mmc.iuav.user.entity.WebsiteInfoDO"> <select id="listServiceBitmapData" resultType="com.mmc.iuav.user.entity.WebsiteInfoDO">
SELECT SELECT
...@@ -392,7 +405,7 @@ ...@@ -392,7 +405,7 @@
</select> </select>
<select id="appBrandMessage" resultMap="UserApplyTagList"> <select id="appBrandMessage" resultMap="UserApplyTagResultMap">
SELECT ua.id, SELECT ua.id,
ua.cooperation_tag_id, ua.cooperation_tag_id,
ua.user_account_id, ua.user_account_id,
...@@ -401,8 +414,6 @@ ...@@ -401,8 +414,6 @@
ua.apply_status, ua.apply_status,
ua.remark, ua.remark,
ua.create_time, ua.create_time,
ua.content,
ua.score,
ct.tag_name, ct.tag_name,
ci.company_name, ci.company_name,
ci.brand_name, ci.brand_name,
...@@ -411,7 +422,9 @@ ...@@ -411,7 +422,9 @@
ci.license_img, ci.license_img,
ci.address, ci.address,
ci.lat, ci.lat,
ci.lon ci.lon,
ci.content,
ci.score
FROM user_apply_tag ua FROM 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
INNER JOIN company_member cm ON cm.user_account_id = ua.user_account_id INNER JOIN company_member cm ON cm.user_account_id = ua.user_account_id
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
select rna.id, rna.user_account_id, rna.union_id, rna.front_id_img, rna.back_id_img, rna.id_number, rna.user_name, rna.sex, rna.nationality, select rna.id, rna.user_account_id, rna.union_id, rna.front_id_img, rna.back_id_img, rna.id_number, rna.user_name, rna.sex, rna.nationality,
rna.birthday, rna.address, rna.issue, rna.start_date, rna.end_date, rna.is_fake_front, rna.is_fake_back, rna.check_status, rna.remark, rna.birthday, rna.address, rna.issue, rna.start_date, rna.end_date, rna.is_fake_front, rna.is_fake_back, rna.check_status, rna.remark,
rna.create_time rna.create_time
from real_name_auth rna from real_name_auth_bak rna
where rna.union_id = #{unionId} and rna.is_deleted = 0 and rna.check_status = 1 where rna.union_id = #{unionId} and rna.is_deleted = 0 and rna.check_status = 1
</select> </select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论