|
@@ -537,9 +537,20 @@ public interface StandardMapper {
|
|
|
String pkName = (String) params.get("pkName");
|
|
|
Long id = (Long) params.get("id");
|
|
|
StringBuilder sqlBuilder = new StringBuilder();
|
|
|
- sqlBuilder.append("select * from ")
|
|
|
- .append(tableName).append(" where ")
|
|
|
- .append(pkName).append(" = ").append(id).append(" limit 1");
|
|
|
+ String other = (String) params.get("other");
|
|
|
+ if(StringUtils.isEmpty(other)) {
|
|
|
+ sqlBuilder.append("select * from ")
|
|
|
+ .append(tableName).append(" where ")
|
|
|
+ .append(pkName).append(" = ").append(id).append(" limit 1");
|
|
|
+ }else {
|
|
|
+ sqlBuilder.append("select ").append(" t.id,t.message_code,t.message_situation,t.place_on_file, ")
|
|
|
+ .append("t.message_time,t.`status`,t.has_annex,t.send_time,t.message_upload,")
|
|
|
+ .append("t.message_enclosure,t.message_body,t.send_user_id,u.nick_name as send_user_name,")
|
|
|
+ .append("t.message_title,t.finish_time,t.message_remark,t.create_by,t.create_time,t.update_by,")
|
|
|
+ .append("t.update_time from ")
|
|
|
+ .append(tableName).append(" t ").append(" join sys_user u on u.id = t.send_user_id ").append(" where ")
|
|
|
+ .append(" t.").append(pkName).append(" = ").append(id).append(" limit 1");
|
|
|
+ }
|
|
|
return sqlBuilder.toString();
|
|
|
}
|
|
|
|