main
rong.liu 11 months ago
parent 46911d5132
commit 1dbf4906a9
  1. 19
      users/src/main/java/com/huoran/users/controller/AliRealNameAuthenticationController.java
  2. 12
      users/src/main/java/com/huoran/users/controller/EnterpriseCertificationController.java
  3. 3
      users/src/main/java/com/huoran/users/mapper/EnterpriseCertificationMapper.java
  4. 28
      users/src/main/java/com/huoran/users/mapper/xml/EnterpriseCertificationMapper.xml
  5. 2
      users/src/main/java/com/huoran/users/service/EnterpriseCertificationService.java
  6. 5
      users/src/main/java/com/huoran/users/service/impl/EnterpriseCertificationServiceImpl.java

@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletRequest;
import java.io.IOException; import java.io.IOException;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
@Api(value = "小程序-实名认证", tags = "小程序-实名认证") @Api(value = "小程序-实名认证", tags = "小程序-实名认证")
@ -44,6 +45,24 @@ public class AliRealNameAuthenticationController {
@Autowired @Autowired
public EnterpriseCertificationService enterpriseCertificationService; public EnterpriseCertificationService enterpriseCertificationService;
@ApiOperation(value = "删除平台全部认证信息")
@PostMapping("/deletePlatformAuthenticationInformation")
public R deletePlatformAuthenticationInformation(@ApiParam(name = "openIds", value = "微信openId", required = true) @RequestBody List<String> openIds) {
openIds.forEach(openId ->{
QueryWrapper<UserAuthenticationInformation> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("open_id", openId);
service.remove(queryWrapper);
QueryWrapper<EnterpriseCertification> queryWrapper1 = new QueryWrapper<>();
queryWrapper1.eq("open_id", openId);
enterpriseCertificationService.remove(queryWrapper1);
});
return R.ok();
}
@ApiOperation(value = "身份证图片验证") @ApiOperation(value = "身份证图片验证")
@PostMapping("/faceAuthentication") @PostMapping("/faceAuthentication")

@ -46,6 +46,12 @@ public class EnterpriseCertificationController {
} }
@PostMapping("/enterpriseCertificationDetails")
@ApiOperation(value = "企业认证详情", response = EnterpriseCertification.class)
public R enterpriseCertificationDetails(@ApiParam(name = "id", value = "主键", required = true) @RequestParam Integer id) {
return service.enterpriseCertificationDetails(id);
}
@PostMapping("/findById") @PostMapping("/findById")
@ApiOperation(value = "查询详情", response = EnterpriseCertification.class) @ApiOperation(value = "查询详情", response = EnterpriseCertification.class)
public R findById(@ApiParam(name = "id", value = "主键", required = true) @RequestParam Integer id) { public R findById(@ApiParam(name = "id", value = "主键", required = true) @RequestParam Integer id) {
@ -56,7 +62,7 @@ public class EnterpriseCertificationController {
@PostMapping("/enterpriseCertificationStatus") @PostMapping("/enterpriseCertificationStatus")
@ApiOperation(value = "查询企业当前认证状态", response = EnterpriseCertification.class) @ApiOperation(value = "查询企业当前认证状态", response = EnterpriseCertification.class)
public R enterpriseCertificationStatus(@ApiParam(name = "openId", value = "微信openId", required = true) Integer openId) { public R enterpriseCertificationStatus(@ApiParam(name = "openId", value = "微信openId", required = true)@RequestParam String openId) {
/*String accountId = TokenUtils.getIdByJwtToken(request);*/ /*String accountId = TokenUtils.getIdByJwtToken(request);*/
QueryWrapper<EnterpriseCertification> queryWrapper = new QueryWrapper<>(); QueryWrapper<EnterpriseCertification> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("open_id", openId); queryWrapper.eq("open_id", openId);
@ -87,12 +93,14 @@ public class EnterpriseCertificationController {
@PostMapping("/informationAudit") @PostMapping("/informationAudit")
@ApiOperation(value = "信息审核", response = EnterpriseCertification.class) @ApiOperation(value = "信息审核", response = EnterpriseCertification.class)
public R informationAudit(@ApiParam(name = "auditStatus", value = "审核状态(2.通过,3.不通过)", required = true) Integer auditStatus, @ApiParam(name = "id", value = "主键", required = true) Integer id, HttpServletRequest request) { public R informationAudit(@ApiParam(name = "auditStatus", value = "审核状态(2.通过,3.不通过)", required = true)@RequestParam Integer auditStatus,
@ApiParam(name = "id", value = "主键", required = true) @RequestParam Integer id, HttpServletRequest request) {
String accountId = TokenUtils.getIdByJwtToken(request); String accountId = TokenUtils.getIdByJwtToken(request);
EnterpriseCertification enterpriseCertification = new EnterpriseCertification(); EnterpriseCertification enterpriseCertification = new EnterpriseCertification();
enterpriseCertification.setAccountId(Integer.valueOf(accountId)); enterpriseCertification.setAccountId(Integer.valueOf(accountId));
enterpriseCertification.setAuditStatus(auditStatus); enterpriseCertification.setAuditStatus(auditStatus);
enterpriseCertification.setId(id);
switch (auditStatus) { switch (auditStatus) {
case 2: case 2:
//通过:更改认证状态 认证状态(0默认未认证 1.认证中2.已认证) //通过:更改认证状态 认证状态(0默认未认证 1.认证中2.已认证)

@ -19,4 +19,7 @@ import org.apache.ibatis.annotations.Param;
public interface EnterpriseCertificationMapper extends BaseMapper<EnterpriseCertification> { public interface EnterpriseCertificationMapper extends BaseMapper<EnterpriseCertification> {
IPage<EnterpriseCertification> selectEnterpriseCertificationList(IPage<EnterpriseCertification> page, @Param("req")EnterpriseCertificationLIstReq req); IPage<EnterpriseCertification> selectEnterpriseCertificationList(IPage<EnterpriseCertification> page, @Param("req")EnterpriseCertificationLIstReq req);
EnterpriseCertification enterpriseCertificationDetails(@Param("id")Integer id);
} }

@ -64,4 +64,32 @@
and t.city=#{req.province,jdbcType=VARCHAR} and t.city=#{req.province,jdbcType=VARCHAR}
</if> </if>
</select> </select>
<select id="enterpriseCertificationDetails" resultType="com.huoran.users.entity.EnterpriseCertification">
SELECT
t.*
FROM
(
SELECT
IFNULL( info.real_name, u.user_name ) AS proposer,
a.phone AS contactInformation,
a.account,
c.*,
IFNULL( cla.province, '未完善' ) AS province,
IFNULL( cla.city, '未完善' ) AS city
FROM
hr_enterprise_certification c
INNER JOIN hr_user_account a ON a.id = c.account_id
INNER JOIN hr_user_info u ON u.user_id = a.user_id
LEFT JOIN hr_user_authentication_information info ON info.account_id = a.id
LEFT JOIN k_platform_team_account ta ON ta.account_id = a.id
LEFT JOIN k_platform_team t ON ta.manage_id = t.manage_id
LEFT JOIN k_platform_team_classification cla ON cla.id = t.classification_id
AND cla.is_del = 0
WHERE
a.is_del = 0
AND u.is_del = 0
) t
WHERE
t.id = #{id}
</select>
</mapper> </mapper>

@ -17,4 +17,6 @@ public interface EnterpriseCertificationService extends IService<EnterpriseCerti
EnterpriseCertification checkWhetherItExists(String comapnyName, Integer id,String opnenId); EnterpriseCertification checkWhetherItExists(String comapnyName, Integer id,String opnenId);
R selectEnterpriseCertificationList(EnterpriseCertificationLIstReq req); R selectEnterpriseCertificationList(EnterpriseCertificationLIstReq req);
R enterpriseCertificationDetails(Integer id);
} }

@ -46,4 +46,9 @@ public class EnterpriseCertificationServiceImpl extends ServiceImpl<EnterpriseCe
return R.ok().put("data", pageList); return R.ok().put("data", pageList);
} }
@Override
public R enterpriseCertificationDetails(Integer id) {
return R.ok().put("data",baseMapper.enterpriseCertificationDetails(id));
}
} }

Loading…
Cancel
Save