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

获取用户合同状态

上级 fb7d6e9b
package com.mmc.iuav.user.model.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author 张培
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AppUserTagVO implements Serializable {
@ApiModelProperty(value = "标签id")
private Integer cooperationTagId;
@ApiModelProperty(value = "标签名称")
private String tagName;
}
...@@ -3,6 +3,7 @@ package com.mmc.iuav.user.controller; ...@@ -3,6 +3,7 @@ package com.mmc.iuav.user.controller;
import com.mmc.iuav.group.Insert; import com.mmc.iuav.group.Insert;
import com.mmc.iuav.group.Update; import com.mmc.iuav.group.Update;
import com.mmc.iuav.response.ResultBody; import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.entity.UserApplyTagDO;
import com.mmc.iuav.user.model.dto.WebsiteRangeDTO; import com.mmc.iuav.user.model.dto.WebsiteRangeDTO;
import com.mmc.iuav.user.model.qo.ApplyQO; import com.mmc.iuav.user.model.qo.ApplyQO;
import com.mmc.iuav.user.model.vo.*; import com.mmc.iuav.user.model.vo.*;
...@@ -129,6 +130,21 @@ public class CooperationController extends BaseController { ...@@ -129,6 +130,21 @@ public class CooperationController extends BaseController {
return cooperationService.approvalApplyTag(id, status); return cooperationService.approvalApplyTag(id, status);
} }
@ApiOperation(value = "app--获取合同标签")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = AppUserTagVO.class)})
@GetMapping("getTagIdByUserId")
public ResultBody getTagIdByUserId(HttpServletRequest request) {
return cooperationService.getTagIdByUserId(this.getUserLoginInfoFromRedis(request).getUserAccountId());
}
@ApiOperation(value = "根据tagid获取合同信息")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = UserApplyTagDO.class)})
@GetMapping("getContractNoAndStatus")
public ResultBody getContractNoAndStatus(
@RequestParam(value = "tagId") Integer tagId,HttpServletRequest request) {
return cooperationService.getContractNoAndStatus(tagId, this.getUserLoginInfoFromRedis(request).getUserAccountId());
}
@ApiOperation(value = "后台设置小程序用户标签") @ApiOperation(value = "后台设置小程序用户标签")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("changeUserTag") @PostMapping("changeUserTag")
......
...@@ -2,8 +2,10 @@ package com.mmc.iuav.user.dao; ...@@ -2,8 +2,10 @@ package com.mmc.iuav.user.dao;
import com.mmc.iuav.user.entity.*; import com.mmc.iuav.user.entity.*;
import com.mmc.iuav.user.model.qo.ApplyQO; import com.mmc.iuav.user.model.qo.ApplyQO;
import com.mmc.iuav.user.model.vo.AppUserTagVO;
import com.mmc.iuav.user.model.vo.ApplyTagEditVO; import com.mmc.iuav.user.model.vo.ApplyTagEditVO;
import com.mmc.iuav.user.model.vo.AttachmentVO; import com.mmc.iuav.user.model.vo.AttachmentVO;
import com.mmc.iuav.user.model.vo.UserApplyTagVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -92,7 +94,7 @@ public interface CooperationDao { ...@@ -92,7 +94,7 @@ public interface CooperationDao {
List<UserApplyTagDO> listUserApplyTag(ApplyQO applyQO); List<UserApplyTagDO> listUserApplyTag(ApplyQO applyQO);
UserApplyTagDO getContractNoAndStatus(Integer tagId, Integer userAccountId);
Integer getAuditSum(Integer status); Integer getAuditSum(Integer status);
...@@ -149,6 +151,7 @@ public interface CooperationDao { ...@@ -149,6 +151,7 @@ public interface CooperationDao {
UserApplyTagDO appBrandMessage(Integer userAccountId); UserApplyTagDO appBrandMessage(Integer userAccountId);
List<AppUserTagVO> getTagIdByUserId(Integer userAccountId);
int countListCompanyInfoByCoopId(Integer coopId); int countListCompanyInfoByCoopId(Integer coopId);
List<CompanyInfoDO> listCompanyInfoByCoopId(Integer coopId, Double lon, Double lat, Integer pageNo, Integer pageSize); List<CompanyInfoDO> listCompanyInfoByCoopId(Integer coopId, Double lon, Double lat, Integer pageNo, Integer pageSize);
......
...@@ -2,11 +2,10 @@ package com.mmc.iuav.user.service; ...@@ -2,11 +2,10 @@ package com.mmc.iuav.user.service;
import com.mmc.iuav.page.PageResult; import com.mmc.iuav.page.PageResult;
import com.mmc.iuav.response.ResultBody; import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
import com.mmc.iuav.user.model.qo.ApplyQO; import com.mmc.iuav.user.model.qo.ApplyQO;
import com.mmc.iuav.user.model.vo.ApplyTagEditVO; import com.mmc.iuav.user.model.qo.CompanyInfoQO;
import com.mmc.iuav.user.model.vo.CooperationTagVO; import com.mmc.iuav.user.model.vo.*;
import com.mmc.iuav.user.model.vo.UserApplyTagVO;
import com.mmc.iuav.user.model.vo.UserCooperationTagVO;
import java.util.List; import java.util.List;
...@@ -55,6 +54,9 @@ public interface CooperationService { ...@@ -55,6 +54,9 @@ public interface CooperationService {
ResultBody approvalApplyTag(Integer id, Boolean status); ResultBody approvalApplyTag(Integer id, Boolean status);
ResultBody getTagIdByUserId(Integer userAccountId);
ResultBody getContractNoAndStatus(Integer tagId, Integer userAccountId);
ResultBody editUserApplyTag(ApplyTagEditVO applyTagEditVO); ResultBody editUserApplyTag(ApplyTagEditVO applyTagEditVO);
ResultBody editUserApplyTagDetails(Integer id); ResultBody editUserApplyTagDetails(Integer id);
......
...@@ -13,6 +13,7 @@ import com.mmc.iuav.user.dao.CompanyDao; ...@@ -13,6 +13,7 @@ import com.mmc.iuav.user.dao.CompanyDao;
import com.mmc.iuav.user.dao.CooperationDao; import com.mmc.iuav.user.dao.CooperationDao;
import com.mmc.iuav.user.entity.*; import com.mmc.iuav.user.entity.*;
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.WebsiteRangeDTO; import com.mmc.iuav.user.model.dto.WebsiteRangeDTO;
import com.mmc.iuav.user.model.qo.ApplyQO; import com.mmc.iuav.user.model.qo.ApplyQO;
import com.mmc.iuav.user.model.vo.*; import com.mmc.iuav.user.model.vo.*;
...@@ -216,6 +217,18 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -216,6 +217,18 @@ public class CooperationServiceImpl implements CooperationService {
return ResultBody.success(); return ResultBody.success();
} }
@Override
public ResultBody getTagIdByUserId(Integer userAccountId) {
List<AppUserTagVO> tagIdByUserId = cooperationDao.getTagIdByUserId(userAccountId);
return ResultBody.success(tagIdByUserId);
}
@Override
public ResultBody getContractNoAndStatus(Integer tagId, Integer userAccountId) {
UserApplyTagDO userApplyTagDO = cooperationDao.getContractNoAndStatus(tagId, userAccountId);
return ResultBody.success(userApplyTagDO);
}
private BUserAccountVO generateBackUserAccountVO(UserApplyTagDO userApplyTagDO) { private BUserAccountVO generateBackUserAccountVO(UserApplyTagDO userApplyTagDO) {
BUserAccountVO bUserAccountVO = new BUserAccountVO(); BUserAccountVO bUserAccountVO = new BUserAccountVO();
UserAccountVO userAccountVO = userAccountService.getUserAccountById(userApplyTagDO.getUserAccountId()); UserAccountVO userAccountVO = userAccountService.getUserAccountById(userApplyTagDO.getUserAccountId());
......
...@@ -302,6 +302,46 @@ ...@@ -302,6 +302,46 @@
order by ua.create_time desc order by ua.create_time desc
limit #{pageNo},#{pageSize} limit #{pageNo},#{pageSize}
</select> </select>
<select id="getContractNoAndStatus" resultMap="UserApplyTagResultMap">
SELECT ua.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,
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>
ua.is_deleted = 0
<if test="tagId != null">
and ua.cooperation_tag_id = #{tagId}
</if>
<if test="userAccountId != null">
and ua.user_account_id = #{userAccountId}
</if>
</where>
</select>
<select id="getAuditSum" resultType="java.lang.Integer"> <select id="getAuditSum" resultType="java.lang.Integer">
SELECT count(*) SELECT count(*)
FROM FROM
...@@ -482,6 +522,8 @@ ...@@ -482,6 +522,8 @@
AND ci.is_deleted = 0 AND ci.is_deleted = 0
</select> </select>
<select id="countListCompanyInfoByCoopId" resultType="java.lang.Integer"> <select id="countListCompanyInfoByCoopId" resultType="java.lang.Integer">
SELECT count(*) SELECT count(*)
FROM user_apply_tag uat FROM user_apply_tag uat
...@@ -537,4 +579,11 @@ ...@@ -537,4 +579,11 @@
and ua.cooperation_tag_id = #{type} and ua.cooperation_tag_id = #{type}
and ua.apply_status = 1 and ua.apply_status = 1
</select> </select>
<select id="getTagIdByUserId" resultType="com.mmc.iuav.user.model.vo.AppUserTagVO">
select cooperation_tag_id,tag_name
from user_apply_tag ua
inner join cooperation_tag ct on ua.cooperation_tag_id = ct.id
where ua.is_deleted = 0 and ct.is_deleted = 0
and ua.user_account_id = #{userAccountId}
</select>
</mapper> </mapper>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论