Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
H
Hgs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐州
Hgs
Commits
61b9c208
Commit
61b9c208
authored
Jun 01, 2021
by
gaoyuan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
772a9c84
33d2cd07
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
315 additions
and
13 deletions
+315
-13
RoleController.java
...main/java/com/house365/web/controller/RoleController.java
+27
-2
UserController.java
...main/java/com/house365/web/controller/UserController.java
+33
-0
HttpUtil.java
...hgs-web/src/main/java/com/house365/web/util/HttpUtil.java
+86
-8
QrCodeUtil.java
...s-web/src/main/java/com/house365/web/util/QrCodeUtil.java
+73
-0
system.properties
...c/main/resources/development/properties/system.properties
+7
-1
system.properties
...rc/main/resources/production/properties/system.properties
+4
-1
system.properties
...-web/src/main/resources/test/properties/system.properties
+4
-1
edit.jsp
...hgs-web/src/main/webapp/WEB-INF/views/role/pages/edit.jsp
+9
-0
list.jsp
...hgs-web/src/main/webapp/WEB-INF/views/user/pages/list.jsp
+36
-0
IUser.java
...rc/main/java/com/house365/ws/interfaces/server/IUser.java
+2
-0
UserMapper.java
.../src/main/java/com/house365/ws/dao/mapper/UserMapper.java
+2
-0
UserImpl.java
...c/main/java/com/house365/ws/interfaces/impl/UserImpl.java
+5
-0
UserMapper.xml
...-ws/src/main/resources/development/mybatis/UserMapper.xml
+9
-0
UserMapper.xml
...s-ws/src/main/resources/production/mybatis/UserMapper.xml
+9
-0
UserMapper.xml
...365-hgs-ws/src/main/resources/test/mybatis/UserMapper.xml
+9
-0
No files found.
house365-hgs-web/src/main/java/com/house365/web/controller/RoleController.java
View file @
61b9c208
...
...
@@ -34,6 +34,7 @@ import org.apache.http.message.BasicNameValuePair;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
...
...
@@ -45,10 +46,11 @@ import org.springside.modules.web.Servlets;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.validation.Valid
;
import
java.io.
IOException
;
import
java.io.
*
;
import
java.util.*
;
/**
* 角色控制器<br>
*
...
...
@@ -93,6 +95,9 @@ public class RoleController extends BaseController {
@Autowired
private
IAttachmentInterface
attachmentInterface
;
@Value
(
"${twodimensional.code.url}"
)
private
String
twoDimensionalUrl
;
/**
* 去新增角色
...
...
@@ -956,5 +961,25 @@ public class RoleController extends BaseController {
return
response
;
}
/**
* 下载一键呼二维码
*
* @return 结果视图
*/
@RequestMapping
(
value
=
"downLoadCallCode"
)
public
void
downLoadCallCode
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@RequestParam
(
"userId"
)
String
userId
)
throws
Exception
{
//根据userid获取city信息
String
cityName
=
user
.
getCityById
(
userId
);
//二维码中包含的信息
StringBuilder
content
=
new
StringBuilder
();
content
.
append
(
twoDimensionalUrl
).
append
(
"uid="
).
append
(
userId
).
append
(
"&"
).
append
(
"city="
).
append
(
cityName
);
response
.
reset
();
//设置请求头
response
.
setContentType
(
"application/octet-stream"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment; filename=1.png"
);
OutputStream
outputStream
=
new
BufferedOutputStream
(
response
.
getOutputStream
());
outputStream
.
write
(
QrCodeUtil
.
createImg
(
content
.
toString
()));
outputStream
.
flush
();
outputStream
.
close
();
}
}
house365-hgs-web/src/main/java/com/house365/web/controller/UserController.java
View file @
61b9c208
package
com
.
house365
.
web
.
controller
;
import
com.alibaba.dubbo.common.json.JSON
;
import
com.beust.jcommander.internal.Lists
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.google.common.base.Joiner
;
...
...
@@ -23,6 +24,7 @@ import org.apache.http.message.BasicNameValuePair;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.Model
;
...
...
@@ -69,6 +71,9 @@ public class UserController extends BaseController {
@Autowired
private
ICustomer
customer
;
@Value
(
"${tlf.bandpeople.url}"
)
private
String
tlfBandPeopleUrl
;
/**
* 去新增账户
*
...
...
@@ -1072,4 +1077,32 @@ public class UserController extends BaseController {
return
accessToken
;
}
/**
* 根据id获取用户的绑定楼盘信息
*
* @param id 账户页面表单对象唯一标识
* @return 用户的绑定信息结果
*/
@RequestMapping
(
value
=
"/bindPeople/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseStatus
(
HttpStatus
.
OK
)
@ResponseBody
public
HResult
getBindPeopleInfo
(
@PathVariable
String
id
)
{
HResult
result
=
new
HResult
();
try
{
Map
<
String
,
String
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"userId"
,
id
);
//通过http调用接口获取用户绑定楼盘信息
String
res
=
HttpUtil
.
simpleGet
(
tlfBandPeopleUrl
,
paramMap
,
null
);
HResult
finalInfo
=
JSON
.
parse
(
res
,
HResult
.
class
);
result
.
setStatus
(
finalInfo
.
getStatus
());
result
.
setData
(
finalInfo
.
getData
());
logger
.
info
(
id
+
" bindpeopleInfo:"
+
finalInfo
.
getData
());
}
catch
(
Exception
e
)
{
result
.
setStatus
(-
1
);
result
.
setErrorMessage
(
"获取绑定用户信息失败"
);
e
.
printStackTrace
();
logger
.
error
(
"获取绑定用户信息失败"
,
e
);
}
return
result
;
}
}
house365-hgs-web/src/main/java/com/house365/web/util/HttpUtil.java
View file @
61b9c208
...
...
@@ -6,10 +6,7 @@ import com.house365.beans.entity.WxUserEntity;
import
com.house365.rest.exception.ServiceException
;
import
com.house365.rest.parameter.House365RestResponse
;
import
net.sf.json.JSONObject
;
import
org.apache.http.HttpEntity
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.HttpStatus
;
import
org.apache.http.NameValuePair
;
import
org.apache.http.*
;
import
org.apache.http.client.HttpClient
;
import
org.apache.http.client.config.RequestConfig
;
import
org.apache.http.client.entity.UrlEncodedFormEntity
;
...
...
@@ -17,26 +14,32 @@ import org.apache.http.client.methods.CloseableHttpResponse;
import
org.apache.http.client.methods.HttpGet
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.client.utils.URIBuilder
;
import
org.apache.http.client.utils.URLEncodedUtils
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.impl.client.CloseableHttpClient
;
import
org.apache.http.impl.client.DefaultHttpClient
;
import
org.apache.http.impl.client.HttpClients
;
import
org.apache.http.message.BasicNameValuePair
;
import
org.apache.http.util.EntityUtils
;
import
org.hibernate.validator.internal.util.privilegedactions.GetMethod
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URI
;
import
java.nio.charset.Charset
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
public
class
HttpUtil
{
private
static
final
Logger
LOG
=
LoggerFactory
.
getLogger
(
"HttpUtil"
);
private
static
final
String
DEFAULT_ENCODING
=
"UTF-8"
;
private
final
static
int
DEFAULT_CONNECT_TIMEOUT
=
5000
;
// 设置连接超时时间,单位毫秒
private
final
static
int
DEFAULT_CONNECTION_REQUEST_TIMEOUT
=
1000
;
// 设置从connect Manager获取Connection 超时时间,单位毫秒
private
final
static
int
DEFAULT_SOCKET_TIMEOUT
=
5000
;
// 请求获取数据的超时时间,单位毫秒 如果访问一个接口,多少时间内无法返回数据,就直接放弃此次调用
/**
*新:get请求
* @param url
...
...
@@ -270,4 +273,79 @@ public class HttpUtil {
}
return
null
;
}
/**
* 简单get请求传输
* @param url
* @param paramMap
* @param encoding
* @return
*/
public
static
String
simpleGet
(
String
url
,
Map
<
String
,
String
>
paramMap
,
String
encoding
){
String
body
=
""
;
encoding
=
StringUtils
.
isBlank
(
encoding
)?
DEFAULT_ENCODING:
encoding
;
//1、创建CloseableHttpClient对象
CloseableHttpClient
client
=
HttpClients
.
createDefault
();
//2、创建get请求
HttpGet
httpGet
=
new
HttpGet
(
url
);
//装填参数
List
<
NameValuePair
>
lists
=
new
ArrayList
<
NameValuePair
>();
if
(
paramMap
!=
null
){
//每个key-value构成一个entrySet对象
Set
<
Map
.
Entry
<
String
,
String
>>
setMap
=
paramMap
.
entrySet
();
//遍历对象 将值保存list集合种
for
(
Map
.
Entry
<
String
,
String
>
entry:
setMap
)
{
lists
.
add
(
new
BasicNameValuePair
(
entry
.
getKey
(),
entry
.
getValue
()));
}
}
//将传递参数 编码化
String
param
=
URLEncodedUtils
.
format
(
lists
,
encoding
);
LOG
.
info
(
"simpleGet------->"
+
param
);
//设置数据
httpGet
.
setURI
(
URI
.
create
(
url
+
"?"
+
param
));
LOG
.
info
(
"simpleGet --- url------->"
+
httpGet
.
getURI
().
toString
());
//配置连接参数信息
RequestConfig
requestConfig
=
RequestConfig
.
custom
()
.
setConnectTimeout
(
DEFAULT_CONNECT_TIMEOUT
).
setConnectionRequestTimeout
(
DEFAULT_CONNECTION_REQUEST_TIMEOUT
)
.
setSocketTimeout
(
DEFAULT_SOCKET_TIMEOUT
).
build
();
httpGet
.
setConfig
(
requestConfig
);
//执行请求操作,并拿到结果(同步阻塞)
CloseableHttpResponse
response
=
null
;
try
{
//5、调用CloseableHttpClient对象的execute(HttpUriRequest request)发送请求,该方法返回一个CloseableHttpResponse。
response
=
client
.
execute
(
httpGet
);
//6、调用HttpResponse的getEntity()方法可获取HttpEntity对象,该对象包装了服务器的响应内容。程序可通过该对象获取服务器的响应内容;调用CloseableHttpResponse的getAllHeaders()、getHeaders(String name)等方法可获取服务器的响应头。
StatusLine
status
=
response
.
getStatusLine
();
LOG
.
info
(
"get请求回调状态 :"
+
status
);
//获取结果实体
HttpEntity
entity
=
response
.
getEntity
();
if
(
entity
!=
null
)
{
//按指定编码转换结果实体为String类型
body
=
EntityUtils
.
toString
(
entity
,
encoding
);
LOG
.
info
(
"get请求回调数据 :"
+
body
);
}
//7、释放连接。无论执行方法是否成功,都必须释放连接
EntityUtils
.
consume
(
entity
);
}
catch
(
UnsupportedEncodingException
e
){
e
.
printStackTrace
();
LOG
.
error
(
"简单get请求遇到UnSpEcode异常"
,
e
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
LOG
.
error
(
"简单get请求遇到IO异常"
,
e
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
LOG
.
error
(
"简单get请求遇到PE异常"
,
e
);
throw
new
ParseException
();
}
finally
{
//释放链接
try
{
response
.
close
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
return
body
;
}
}
house365-hgs-web/src/main/java/com/house365/web/util/QrCodeUtil.java
0 → 100644
View file @
61b9c208
package
com
.
house365
.
web
.
util
;
import
com.google.zxing.BarcodeFormat
;
import
com.google.zxing.EncodeHintType
;
import
com.google.zxing.MultiFormatWriter
;
import
com.google.zxing.client.j2se.MatrixToImageWriter
;
import
com.google.zxing.common.BitMatrix
;
import
com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.io.*
;
import
java.util.Hashtable
;
/**
* 根据url生产二维码
* @author huang xiner
* @version 1.0
* @date 2021/5/25 10:44
*/
public
class
QrCodeUtil
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
QrCodeUtil
.
class
.
getName
());
private
static
final
int
BLACK
=
0xFF000000
;
private
static
final
int
WHITE
=
0xFFFFFFFF
;
private
static
final
int
WIDTH
=
750
;
private
static
final
int
HEIGHT
=
750
;
/**
* 功能描述:生成二维码字节数组
* @param content 文本内容
* @return
*/
public
static
byte
[]
createImg
(
String
content
)
throws
Exception
{
byte
[]
data
=
null
;
File
tempFile
=
null
;
FileInputStream
input
=
null
;
ByteArrayOutputStream
output
=
null
;
try
{
output
=
new
ByteArrayOutputStream
();
tempFile
=
File
.
createTempFile
(
"temp"
,
null
);
//生成临时图片
Hashtable
<
EncodeHintType
,
Object
>
hints
=
new
Hashtable
<
EncodeHintType
,
Object
>();
hints
.
put
(
EncodeHintType
.
ERROR_CORRECTION
,
ErrorCorrectionLevel
.
H
);
hints
.
put
(
EncodeHintType
.
CHARACTER_SET
,
"utf-8"
);
hints
.
put
(
EncodeHintType
.
MARGIN
,
1
);
BitMatrix
matrix
=
new
MultiFormatWriter
().
encode
(
content
,
BarcodeFormat
.
QR_CODE
,
WIDTH
,
HEIGHT
,
hints
);
MatrixToImageWriter
.
writeToFile
(
matrix
,
"png"
,
tempFile
);
//图片转储字节数组
input
=
new
FileInputStream
(
tempFile
);
byte
[]
temp
=
new
byte
[
1000
];
int
n
;
while
((
n
=
input
.
read
(
temp
))
!=
-
1
)
{
output
.
write
(
temp
,
0
,
n
);
}
data
=
output
.
toByteArray
();
logger
.
info
(
"根据内容{}创建二维码成功"
,
content
);
}
catch
(
Exception
ex
)
{
throw
new
Exception
(
"生成二维码图片异常"
,
ex
);
}
finally
{
try
{
if
(
input
!=
null
)
input
.
close
();
if
(
output
!=
null
)
output
.
close
();
}
catch
(
IOException
ex
)
{
logger
.
error
(
"创建二维码成功,文件流关闭异常"
,
ex
);
}
if
(
tempFile
!=
null
)
tempFile
.
delete
();
}
return
data
;
}
}
house365-hgs-web/src/main/resources/development/properties/system.properties
View file @
61b9c208
...
...
@@ -3,9 +3,10 @@
#desc:set system properties
## \u6D88\u8D39\u65B9\u5E94\u7528\u540D\uFF0C\u7528\u4E8E\u8BA1\u7B97\u4F9D\u8D56\u5173\u7CFB\uFF0C\u4E0D\u662F\u5339\u914D\u6761\u4EF6\uFF0C\u4E0D\u8981\u4E0E\u63D0\u4F9B\u65B9\u4E00\u6837 ##
#dubbo.application.name=house365-hgs-web-hxe
dubbo.application.name
=
house365-hgs-web
## \u4F7F\u7528multicast\u5E7F\u64AD\u6CE8\u518C\u4E2D\u5FC3\u66B4\u9732\u53D1\u73B0\u670D\u52A1\u5730\u5740 \uFF0C\u82E5\u6709\u591A\u4E2A\u6CE8\u518C\u4E2D\u5FC3\u8BF7\u7528\u201C,\u201D\u9694\u5F00
#dubbo.zookeeper.address=1
27.0.0.
1:2181
#dubbo.zookeeper.address=1
92.168.105.12
1:2181
dubbo.zookeeper.address
=
192.168.105.101:2181,192.168.105.100:2181,192.168.105.17:2181
## user demo \u7248\u672C\u53F7\uFF0C\u8FD9\u4E2Aversion\u547D\u540D\u89C4\u5219\u4E3Aappname.sample.version\uFF0C\u662F\u4E3A\u4E86\u7FA4\u5B9A\u5F53\u524Dweb\u8C03\u7528\u5F53\u524Dws\uFF0C\u4E0D\u9700\u8981\u4FEE\u6539
dubbo.house365.version
=
house365.version
...
...
@@ -73,3 +74,7 @@ get.pay.url = https://mtsapi.house365.com
IM.SYNC.URL
=
http://www.test.yunxin.com
#云迹拉取新接口地址
CLOUD.PULL.URL
=
http://192.168.105.121:8083/user/hgs/loginaccountinfo
#团立方获取用户绑定楼盘信息接口地址
tlf.bandpeople.url
=
http://192.168.105.28:8181/house365-taofanghui/bindPeople/userInfo
#一键呼二维码中包含的url
twodimensional.code.url
=
https://m.house365.com/Home/WxNews/dail?
\ No newline at end of file
house365-hgs-web/src/main/resources/production/properties/system.properties
View file @
61b9c208
...
...
@@ -73,7 +73,10 @@ get.pay.url = https://mtsapi.house365.com
IM.SYNC.URL
=
http://yunxinim.house365.com
#云迹拉取新接口地址
CLOUD.PULL.URL
=
http://cdx2.prod.house365.com:8083/user/hgs/loginaccountinfo
#团立方获取用户绑定楼盘信息接口地址
tlf.bandpeople.url
=
http://mobitfadmin.house365.com/house365-taofanghui/bindPeople/userInfo
#一键呼二维码中包含的url
twodimensional.code.url
=
https://m.house365.com/Home/WxNews/dail?
house365-hgs-web/src/main/resources/test/properties/system.properties
View file @
61b9c208
...
...
@@ -73,5 +73,8 @@ get.pay.url = https://mtsapi.house365.com
IM.SYNC.URL
=
http://www.test.yunxin.com
#云迹拉取新接口地址
CLOUD.PULL.URL
=
http://192.168.105.121:8083/user/hgs/loginaccountinfo
#团立方获取用户绑定楼盘信息接口地址
tlf.bandpeople.url
=
http://192.168.105.28:8181/house365-taofanghui/bindPeople/userInfo
#一键呼二维码中包含的url
twodimensional.code.url
=
https://m.house365.com/Home/WxNews/dail?
house365-hgs-web/src/main/webapp/WEB-INF/views/role/pages/edit.jsp
View file @
61b9c208
...
...
@@ -93,6 +93,11 @@
<span
id=
"hotlinenum"
>
4008908365
${entity.hotlinephone}
</span>
<font
color=
"red"
><form:errors
path=
"userVo.entity.mobile"
/></font>
<!--新增下载二维码 -->
<c:if
test=
"${not empty entity.hotlinephone}"
>
<input
class=
"btn blue"
type=
"button"
onclick=
"downLoadCallCode(${entity.id})"
value=
"下载一键呼二维码"
>
</c:if>
</div>
</div>
</div>
...
...
@@ -388,6 +393,10 @@
return
false
;
}
}
// 下载一键呼二维码
function
downLoadCallCode
(
id
){
window
.
open
(
"${ctx}/role/downLoadCallCode?userId="
+
id
);
}
</script>
</body>
...
...
house365-hgs-web/src/main/webapp/WEB-INF/views/user/pages/list.jsp
View file @
61b9c208
...
...
@@ -477,6 +477,18 @@
House365Util
.
createModal
(
"删除员工"
,
"员工名下还有客户,请转移交接给其他置业顾问后再删除。"
,
function
()
{
});
}
else
{
//获取删除用户的绑定楼盘信息
$
.
ajax
({
url
:
'${ctx}/user/bindPeople/'
+
selectedId
,
type
:
"GET"
,
success
:
function
(
result
)
{
console
.
info
(
result
.
data
)
if
(
result
.
status
==
0
)
{
if
(
result
.
data
!=
null
&&
result
.
data
.
length
>
0
){
//员工有绑定的楼盘,不能删除
alert
(
"请在团立方后台解绑该顾问"
);
return
;
}
else
{
House365Util
.
createModal
(
"删除员工"
,
"删除后将无法恢复员工账号,请确认是否继续?"
,
function
()
{
debugger
;
if
(
selectedId
.
includes
(
"257"
)
==
true
)
{
...
...
@@ -493,6 +505,30 @@
});
});
}
}
else
{
alert
(
result
.
errorMessage
);
}
}
});
<%--
House365Util
.
createModal
(
"删除员工"
,
"删除后将无法恢复员工账号,请确认是否继续?"
,
function
()
{
--%>
<%--
debugger
;
--%>
<%--
if
(
selectedId
.
includes
(
"257"
)
==
true
)
{
--%>
<%--
alert
(
"appstore账户,请勿操作"
);
--%>
<%--
return
;
--%>
<%--
}
--%>
<%--
$
.
ajax
({
--%>
<%--
url
:
'${ctx}/user/'
+
selectedId
,
--%>
<%--
type
:
"DELETE"
,
--%>
<%--
success
:
function
()
{
--%>
<%--
$
(
"input[name='memberCheck']"
).
removeAttr
(
"checked"
);
--%>
<%--
window
.
location
.
reload
();
--%>
<%--
}
--%>
<%--
});
--%>
<%--
});
--%>
}
}
};
...
...
house365-hgs-ws-interfaces/src/main/java/com/house365/ws/interfaces/server/IUser.java
View file @
61b9c208
...
...
@@ -185,4 +185,6 @@ public interface IUser extends IService {
void
update
(
UserWxRelation
userWxRelation
);
String
getCityById
(
String
userId
);
}
house365-hgs-ws/src/main/java/com/house365/ws/dao/mapper/UserMapper.java
View file @
61b9c208
...
...
@@ -51,4 +51,6 @@ public interface UserMapper {
void
updateUserStatus
(
Map
<
String
,
Object
>
map
);
String
getCityById
(
String
userId
);
}
house365-hgs-ws/src/main/java/com/house365/ws/interfaces/impl/UserImpl.java
View file @
61b9c208
...
...
@@ -1104,6 +1104,11 @@ public class UserImpl implements IUser {
relationMapper
.
update
(
userWxRelation
);
}
@Override
public
String
getCityById
(
String
userId
)
{
return
userMapper
.
getCityById
(
userId
);
}
/**
* 以下均为自动生成
*/
...
...
house365-hgs-ws/src/main/resources/development/mybatis/UserMapper.xml
View file @
61b9c208
...
...
@@ -269,4 +269,12 @@
WHERE mobile = #{mobile}
</update>
<select
id=
"getCityById"
parameterType=
"String"
resultType=
"String"
>
SELECT
dd.`name` AS city
FROM `user` u
inner JOIN department dd on u.deptUrlPath = dd.urlPath
where u.id=#{userId}
</select>
</mapper>
\ No newline at end of file
house365-hgs-ws/src/main/resources/production/mybatis/UserMapper.xml
View file @
61b9c208
...
...
@@ -269,4 +269,12 @@
WHERE mobile = #{mobile}
</update>
<select
id=
"getCityById"
parameterType=
"String"
resultType=
"String"
>
SELECT
dd.`name` AS city
FROM `user` u
inner JOIN department dd on u.deptUrlPath = dd.urlPath
where u.id=#{userId}
</select>
</mapper>
\ No newline at end of file
house365-hgs-ws/src/main/resources/test/mybatis/UserMapper.xml
View file @
61b9c208
...
...
@@ -269,4 +269,12 @@
WHERE mobile = #{mobile}
</update>
<select
id=
"getCityById"
parameterType=
"String"
resultType=
"String"
>
SELECT
dd.`name` AS city
FROM `user` u
inner JOIN department dd on u.deptUrlPath = dd.urlPath
where u.id=#{userId}
</select>
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment