Commit 25c5dd07 by zhengxj

finish 技工管理列表查询条件整合 on 20191009

by zhengxj 

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@24147 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 3dcac6b7
/*
* Copyright (c) 2018, 2028, glsx and/or its affiliates. All rights reserved.
* GLSX PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.glsx.usercenter.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.glsx.common.constants.ResultObject;
import com.glsx.usercenter.constants.ResultCodeEnum;
import com.glsx.usercenter.pojo.sp.ProviderVo;
/**
* @ClassName: MechanicController
* @Description: TODO(这里用一句话描述这个类的作用)
* @author Zheng Xiajun
* @date 2019年10月9日
*
*/
@RestController
@RequestMapping(value = "/mechanic")
public class MechanicController extends BaseReportController {
/**
*
*
* @author Zheng Xiajun
* @Title: getMechanicInfo
* @Description: 服务商-指派技工-查看技工信息
* @param @param
* id 技工id
* @param @return
* 设定文件
* @return ResultObject 返回类型
*
*/
@GetMapping("/getMechanicInfo")
public ResultObject getMechanicInfo(Integer id) {
// TODO 区分已认证与未认证技工信息
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg(), null);
}
}
package com.glsx.usercenter.mapper; package com.glsx.usercenter.mapper;
import com.glsx.usercenter.dto.ServiceInfo; import java.util.List;
import com.glsx.usercenter.pojo.menu.SysOrganization;
import com.glsx.usercenter.pojo.user.*;
import com.glsx.usercenter.pojo.sp.ProviderQueryVo;
import com.glsx.usercenter.pojo.sp.ProviderVo;
import com.glsx.usercenter.pojo.vo.UserQueryVo;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import com.glsx.usercenter.dto.ServiceInfo;
import com.glsx.usercenter.pojo.menu.SysOrganization;
import com.glsx.usercenter.pojo.user.SysManager;
import com.glsx.usercenter.pojo.user.SysMechanic;
import com.glsx.usercenter.pojo.user.SysMerchant;
import com.glsx.usercenter.pojo.user.SysUser;
import com.glsx.usercenter.pojo.user.SysUserExample;
import com.glsx.usercenter.pojo.vo.UserQueryVo;
public interface SysUserMapper { public interface SysUserMapper {
long countByExample(SysUserExample example); long countByExample(SysUserExample example);
......
...@@ -94,6 +94,11 @@ public class UserQueryVo extends BaseQueryVo { ...@@ -94,6 +94,11 @@ public class UserQueryVo extends BaseQueryVo {
*/ */
private String keyWord; private String keyWord;
/**
* 技工认证状态
*/
private String mechanicStatus;
public String getKeyWord() { public String getKeyWord() {
return keyWord; return keyWord;
} }
...@@ -102,6 +107,16 @@ public class UserQueryVo extends BaseQueryVo { ...@@ -102,6 +107,16 @@ public class UserQueryVo extends BaseQueryVo {
this.keyWord = keyWord; this.keyWord = keyWord;
} }
public String getMechanicStatus() {
return mechanicStatus;
}
public void setMechanicStatus(String mechanicStatus) {
this.mechanicStatus = mechanicStatus;
}
public Integer getMechanicId() { public Integer getMechanicId() {
return mechanicId; return mechanicId;
} }
......
...@@ -999,26 +999,28 @@ ...@@ -999,26 +999,28 @@
WHERE WHERE
ssm.service_id = #{userId} ssm.service_id = #{userId}
AND u.user_type = 3 AND u.user_type = 3
AND sm.mechanic_status = 'sys_user_status_pass_check' <!-- AND sm.mechanic_status = 'sys_user_status_pass_check' -->
<if test="id != null and id!=''"> <if test="id != null and id!=''">
and u.id = #{id,jdbcType=INTEGER} and u.id = #{id,jdbcType=INTEGER}
</if> </if>
<if test="keyWord != null and keyWord!=''">
<if test="mechanicId != null "> and( u.id like #{keyWord} or u.name like "%"#{keyWord,jdbcType=VARCHAR}"%" or su.name like "%"#{keyWord,jdbcType=VARCHAR}"%" or u.phone_number like "%"#{phoneNumber,jdbcType=VARCHAR}"%" )
and u.id like #{mechanicId}
</if> </if>
<!-- <if test="mechanicId != null ">
and u.id like #{mechanicId}
</if> -->
<if test="serviceType != null and serviceType!=''"> <if test="serviceType != null and serviceType!=''">
and sm.service_type = #{serviceType,jdbcType=VARCHAR} and sm.service_type = #{serviceType,jdbcType=VARCHAR}
</if> </if>
<if test="name != null and name!=''"> <!-- <if test="name != null and name!=''">
and u.name like "%"#{name,jdbcType=VARCHAR}"%" and u.name like "%"#{name,jdbcType=VARCHAR}"%"
</if> </if> -->
<if test="phoneNumber != null and phoneNumber!=''"> <!-- <if test="phoneNumber != null and phoneNumber!=''">
and u.phone_number like "%"#{phoneNumber,jdbcType=VARCHAR}"%" and u.phone_number like "%"#{phoneNumber,jdbcType=VARCHAR}"%"
</if> </if> -->
<if test="serviceKey != null and serviceKey!=''"> <if test="serviceKey != null and serviceKey!=''">
AND sdd.data_key LIKE "%"#{serviceKey,jdbcType=VARCHAR}"%" AND sdd.data_key LIKE "%"#{serviceKey,jdbcType=VARCHAR}"%"
</if> </if>
...@@ -1033,6 +1035,14 @@ ...@@ -1033,6 +1035,14 @@
and u.user_status IN ('sys_user_status_normal','sys_user_status_nonuse') and u.user_status IN ('sys_user_status_normal','sys_user_status_nonuse')
</otherwise> </otherwise>
</choose> </choose>
<choose>
<when test="mechanicStatus != null and mechanicStatus !=''">
and sm.mechanic_status= #{mechanicStatus,jdbcType=VARCHAR}
</when>
<otherwise>
and sm.mechanic_status IN ('sys_user_status_pass_check','sys_user_status_uncheck','sys_user_status_nopass_check')
</otherwise>
</choose>
GROUP BY GROUP BY
u.id u.id
</select> </select>
...@@ -1096,7 +1106,7 @@ ...@@ -1096,7 +1106,7 @@
<if test="keyWord != null and keyWord!=''"> <if test="keyWord != null and keyWord!=''">
and( u.id like #{keyWord} or u.name like "%"#{keyWord,jdbcType=VARCHAR}"%" or su.name like "%"#{keyWord,jdbcType=VARCHAR}"%" ) and( u.id like #{keyWord} or u.name like "%"#{keyWord,jdbcType=VARCHAR}"%" or su.name like "%"#{keyWord,jdbcType=VARCHAR}"%" or u.phone_number like "%"#{phoneNumber,jdbcType=VARCHAR}"%" )
</if> </if>
<!-- <!--
<if test="mechanicId != null "> <if test="mechanicId != null ">
...@@ -1110,10 +1120,9 @@ ...@@ -1110,10 +1120,9 @@
<!-- <if test="name != null and name!=''"> <!-- <if test="name != null and name!=''">
and u.name like "%"#{name,jdbcType=VARCHAR}"%" and u.name like "%"#{name,jdbcType=VARCHAR}"%"
</if> </if>
-->
<if test="phoneNumber != null and phoneNumber!=''"> <if test="phoneNumber != null and phoneNumber!=''">
and u.phone_number like "%"#{phoneNumber,jdbcType=VARCHAR}"%" and u.phone_number like "%"#{phoneNumber,jdbcType=VARCHAR}"%"
</if> </if> -->
<if test="serviceKey != null and serviceKey!=''"> <if test="serviceKey != null and serviceKey!=''">
AND sdd.data_key LIKE "%"#{serviceKey,jdbcType=VARCHAR}"%" AND sdd.data_key LIKE "%"#{serviceKey,jdbcType=VARCHAR}"%"
</if> </if>
...@@ -1128,7 +1137,15 @@ ...@@ -1128,7 +1137,15 @@
and u.user_status IN ('sys_user_status_normal','sys_user_status_nonuse') and u.user_status IN ('sys_user_status_normal','sys_user_status_nonuse')
</otherwise> </otherwise>
</choose> </choose>
<choose>
<when test="mechanicStatus != null and mechanicStatus !=''">
and sm.mechanic_status= #{mechanicStatus,jdbcType=VARCHAR}
</when>
<otherwise>
and sm.mechanic_status IN ('sys_user_status_pass_check','sys_user_status_uncheck','sys_user_status_nopass_check') and sm.mechanic_status IN ('sys_user_status_pass_check','sys_user_status_uncheck','sys_user_status_nopass_check')
</otherwise>
</choose>
GROUP BY u.id GROUP BY u.id
ORDER BY u.create_time DESC ORDER BY u.create_time DESC
</select> </select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!