Commit a30372ce by zhanghj

V1.2.0--优化代码

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@21978 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent 1a10232a
......@@ -396,7 +396,6 @@ public class IndentServiceImpl implements IndentService {
// TODO Auto-generated method stub
int pageIndex = page.getPageIndex();
int pageSize = page.getPageSize();
PageHelper.startPage(pageIndex, pageSize, true);
List<SysIndent> list = new ArrayList<SysIndent>();
Integer currentUserId = UserUtils.getUserId(request);
JSONObject obj = userClient.getUserById(currentUserId);
......@@ -405,9 +404,11 @@ public class IndentServiceImpl implements IndentService {
Byte userType = data.getByte("userType");
if (Constants.USER_TYPE_MECHANIC == userType) {
indent.setUserId(currentUserId);
PageHelper.startPage(pageIndex, pageSize, true);
list = getMechanicIndentList(indent);
} else if (Constants.USER_TYPE_SP == userType) {
indent.setUserId(currentUserId);
PageHelper.startPage(pageIndex, pageSize, true);
list = getSPIndentList(indent);
}
}
......
......@@ -15,6 +15,10 @@ public class Constants {
* 用户信息审核短信模板
*/
public static final String USER_INFO_APPROVAL_SMS_CONTENT = "您收到的验证码是:{0}。为保障信息安全,请勿告诉他人。";
/**
* 技工发起订货单,请求服务商审核短信模板
*/
public static final String SEND_INDENT_TO_SERVICE_SMS_CONTENT = "{0}订货了,请快点审核吧!订单号:{1}";
/**
* 短信类型
......
......@@ -192,7 +192,7 @@ public class CommonController {
public ResultObject sendIndentSmsToService(@RequestParam("mechanicName")String mechanicName, @RequestParam("phone") String phone, @RequestParam("indentNo") String indentNo) throws IOException {
SmsUtil smsUtil = new SmsUtil();
try {
String msgContent = MessageFormat.format("{0}订货了,请快点审核吧!订单号:{1}", mechanicName, indentNo );
String msgContent = MessageFormat.format(Constants.SEND_INDENT_TO_SERVICE_SMS_CONTENT, mechanicName, indentNo );
smsUtil.send(phone, msgContent, PropertiesUtil.getProperty(Constants.SMS_SEND_INDENT_SOURCE));
} catch (Exception e) {
logger.error(phone + "发送技工订货短信失败" + e.getMessage(), e);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!