Commit f84d192e by zhanghj

V1.2.0--修复技工新增订货单后,给所属服务商发短信问题

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@22104 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent fc2248b5
...@@ -1160,7 +1160,7 @@ public class UserController extends BaseController { ...@@ -1160,7 +1160,7 @@ public class UserController extends BaseController {
@RequestMapping(value = "/getMechanicSP", method = {RequestMethod.GET}) @RequestMapping(value = "/getMechanicSP", method = {RequestMethod.GET})
public ResultObject getMechanicSP(Integer userId) { public ResultObject getMechanicSP(Integer userId) {
Integer serviceId = sysUserService.getMechanicSP(userId); SysUser user = sysUserService.getMechanicSP(userId);
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg(),serviceId); return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg(),user);
} }
} }
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.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);
...@@ -160,5 +164,15 @@ public interface SysUserMapper { ...@@ -160,5 +164,15 @@ public interface SysUserMapper {
*/ */
List<SysManager> getAllIndentUserList(@Param("userType")Integer userType, @Param("queryContent") String queryContent); List<SysManager> getAllIndentUserList(@Param("userType")Integer userType, @Param("queryContent") String queryContent);
Integer getMechanicSP(@Param("userId")Integer userId); /**
*
* @author zhanghj
* @Title: getMechanicSP
* @Description: TODO 获取技工所属服务商信息
* @param userId
* @return
* SysUser
*
*/
SysUser getMechanicSP(@Param("userId")Integer userId);
} }
\ No newline at end of file \ No newline at end of file
...@@ -328,11 +328,11 @@ public interface SysUserService { ...@@ -328,11 +328,11 @@ public interface SysUserService {
* *
* @author zhanghj * @author zhanghj
* @Title: getMechanicSP * @Title: getMechanicSP
* @Description: TODO 获取技工所属服务商id * @Description: TODO 获取技工所属服务商信息
* @param userId * @param userId
* @return * @return
* Integer * SysUser
* *
*/ */
Integer getMechanicSP(Integer userId); SysUser getMechanicSP(Integer userId);
} }
...@@ -909,7 +909,7 @@ public class SysUserServiceImpl implements SysUserService { ...@@ -909,7 +909,7 @@ public class SysUserServiceImpl implements SysUserService {
} }
@Override @Override
public Integer getMechanicSP(Integer userId) { public SysUser getMechanicSP(Integer userId) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return sysUserMapper.getMechanicSP(userId); return sysUserMapper.getMechanicSP(userId);
} }
......
...@@ -1389,13 +1389,15 @@ ...@@ -1389,13 +1389,15 @@
</where> </where>
</select> </select>
<select id="getMechanicSP" resultType="java.lang.Integer"> <select id="getMechanicSP" resultType="com.glsx.usercenter.pojo.user.SysUser">
SELECT SELECT
service_id su.id, su.username, su.`name`, su.phone_number as phoneNumber, su.user_status as userStatus,
su.user_type as userType
FROM FROM
sys_service_mechanic sys_service_mechanic ssm
LEFT JOIN sys_user su ON ssm.service_id = su.id
<where> <where>
and mechanic_id = #{userId} and ssm.mechanic_id = #{userId}
</where> </where>
</select> </select>
</mapper> </mapper>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!