格式化代码

This commit is contained in:
20932067@zju.edu.cn 2021-03-23 15:11:26 +08:00
parent 2ed8ab7a8b
commit 60add8972d
52 changed files with 806 additions and 721 deletions

View File

@ -42,7 +42,6 @@ public class AccountController {
private AccountService accountService;
@Root
@RequestMapping(value = "getallaccount", method = RequestMethod.POST)
private Result<Map<String, Object>> getAllAccount(HttpServletRequest request) {
@ -165,6 +164,7 @@ public class AccountController {
/**
* 设置密保
*
* @param request
* @return
*/
@ -349,7 +349,4 @@ public class AccountController {
}
}

View File

@ -31,6 +31,7 @@ public class DataShowController {
/**
* 获取数据信息
*
* @param request
* @return
*/

View File

@ -34,6 +34,7 @@ public class FlatsController {
/**
* 添加公寓信息
*
* @param request
* @return
*/
@ -58,6 +59,7 @@ public class FlatsController {
/**
* 删除公寓信息
*
* @param request
* @return
*/
@ -83,6 +85,7 @@ public class FlatsController {
/**
* 修改公寓信息
*
* @param request
* @return
*/
@ -112,6 +115,7 @@ public class FlatsController {
/**
* 获取公寓信息
*
* @param request
* @return
*/

View File

@ -35,6 +35,7 @@ public class OrderController {
/**
* 用户取消订单
*
* @param request
* @return
*/
@ -62,6 +63,7 @@ public class OrderController {
/**
* 用户确认快递送达
*
* @param request
* @return
*/
@ -86,6 +88,7 @@ public class OrderController {
/**
* 快递员送达快递
*
* @param request
* @return
*/
@ -113,6 +116,7 @@ public class OrderController {
/**
* 快递员获取自己的任务列表
*
* @param request
* @return
*/
@ -156,6 +160,7 @@ public class OrderController {
/**
* 快递员获取任务
*
* @param request
* @return
*/
@ -221,6 +226,7 @@ public class OrderController {
/**
* 管理员获取所有的的订单列表
*
* @param request
* @return
*/
@ -260,6 +266,7 @@ public class OrderController {
/**
* 用户获取自己的的订单列表
*
* @param request
* @return
*/
@ -299,6 +306,7 @@ public class OrderController {
/**
* 添加订单
*
* @param request
* @return
*/

View File

@ -35,6 +35,7 @@ public class PriceController {
/**
* 添加价格
*
* @param request
* @return
*/
@ -60,6 +61,7 @@ public class PriceController {
/**
* 删除价格
*
* @param request
* @return
*/
@ -81,9 +83,9 @@ public class PriceController {
}
/**
* 快递类型和价格
*
* @param request
* @return
*/
@ -115,6 +117,7 @@ public class PriceController {
/**
* 获取快递类型
*
* @param request
* @return
*/

View File

@ -17,6 +17,7 @@ public interface AccountDao {
/**
* 没有条件获取所有用户信息
*
* @return
*/
List<AccountRoot> queryAccount();
@ -30,12 +31,14 @@ public interface AccountDao {
/**
* 获取用户总数
*
* @return
*/
Integer queryAccountCount(@Param("accountSelect") AccountSelect accountSelect);
/**
* 检查是否有密保
*
* @param phone
* @return
*/
@ -52,6 +55,7 @@ public interface AccountDao {
/**
* 通过订单id获取到用户信息
*
* @param orderID
* @return
*/
@ -59,6 +63,7 @@ public interface AccountDao {
/**
* 添加用户
*
* @param account
* @return
*/
@ -66,6 +71,7 @@ public interface AccountDao {
/**
* 修改用户权限
*
* @param id
* @param identityId
* @return
@ -74,6 +80,7 @@ public interface AccountDao {
/**
* 修改密码
*
* @param id
* @param password
* @return
@ -82,6 +89,7 @@ public interface AccountDao {
/**
* 更新用户信息
*
* @param account
* @return
*/
@ -89,6 +97,7 @@ public interface AccountDao {
/**
* 设置密保问题
*
* @param account
* @return
*/

View File

@ -15,6 +15,7 @@ import java.util.List;
public interface ComplaintDao {
/**
* 新增投诉建议
*
* @param complaint
* @return
*/
@ -22,12 +23,14 @@ public interface ComplaintDao {
/**
* 获取投诉建议
*
* @return
*/
List<Complaint> queryComplaint(@Param("complaintSelect") ComplaintSelect complaintSelect);
/**
* 获取列表总数
*
* @param complaintSelect
* @return
*/
@ -35,6 +38,7 @@ public interface ComplaintDao {
/**
* 阅读投诉建议
*
* @param id
* @return
*/
@ -42,6 +46,7 @@ public interface ComplaintDao {
/**
* 删除投诉与建议
*
* @param id
* @return
*/
@ -49,6 +54,7 @@ public interface ComplaintDao {
/**
* 获取投诉和建议未读消息数量
*
* @return
*/
Integer getComplaintCount();

View File

@ -12,6 +12,7 @@ public interface DataShowDao {
/**
* 管理员通过状态获取订单数量
* 0 为获取全部
*
* @return
*/
Integer qureyCountStateAdmin(@Param("state") Integer state);
@ -19,6 +20,7 @@ public interface DataShowDao {
/**
* 管理员通过状态获取收入
* 0 为获取全部
*
* @return
*/
Double qureyPriceStateAdmin(@Param("state") Integer state);
@ -26,6 +28,7 @@ public interface DataShowDao {
/**
* 快递员通过状态获取订单总数
* 0 为获取全部
*
* @param courierId
* @param state
* @return
@ -34,6 +37,7 @@ public interface DataShowDao {
/**
* 快递员通过状态获取收入
*
* @param courierId
* @param state
* @return
@ -43,6 +47,7 @@ public interface DataShowDao {
/**
* 用户获取自己的订单总数
*
* @param selfId
* @param state
* @return
@ -51,6 +56,7 @@ public interface DataShowDao {
/**
* 用户获取自己的价格总数
*
* @param selfId
* @param state
* @return

View File

@ -14,12 +14,14 @@ import java.util.List;
public interface FlatsDao {
/**
* 获取公寓列表
*
* @return
*/
List<Flats> queryAllFlat();
/**
* 添加公寓
*
* @param flats
* @return
*/
@ -27,6 +29,7 @@ public interface FlatsDao {
/**
* 删除公寓
*
* @param id
* @return
*/
@ -34,6 +37,7 @@ public interface FlatsDao {
/**
* 修改公寓
*
* @param flats
* @return
*/

View File

@ -12,6 +12,7 @@ import org.apache.ibatis.annotations.Param;
public interface MailConfigDao {
/**
* 获取邮件配置
*
* @return
*/
MailConfig getMailConfig();

View File

@ -16,8 +16,10 @@ public interface MessagesDao {
int sendMessages(List<Messages> messagesList);
/**
* 添加信息
*
* @param messages
* @return
*/
@ -25,6 +27,7 @@ public interface MessagesDao {
/**
* 阅读信息
*
* @param id
* @param accountId
* @return
@ -33,6 +36,7 @@ public interface MessagesDao {
/**
* 删除信息
*
* @param id
* @param accountId
* @return
@ -41,6 +45,7 @@ public interface MessagesDao {
/**
* 获取用户信息
*
* @param messageSelect
* @return
*/
@ -52,5 +57,4 @@ public interface MessagesDao {
Integer getMessageReaderCount(@Param("accountId") Integer accountId);
}

View File

@ -14,6 +14,7 @@ import java.util.List;
public interface OrderDao {
/**
* 添加
*
* @param orderInsert
* @return
*/
@ -22,6 +23,7 @@ public interface OrderDao {
/**
* 获取全部订单列表
*
* @param orderSelect
* @return
*/
@ -29,6 +31,7 @@ public interface OrderDao {
/**
* 获取全部订单列表总数
*
* @param orderSelect
* @return
*/
@ -36,6 +39,7 @@ public interface OrderDao {
/**
* 获取用户自己订单列表
*
* @param orderSelect
* @return
*/
@ -43,6 +47,7 @@ public interface OrderDao {
/**
* 获取用户自己订单列表总数
*
* @param orderSelect
* @return
*/
@ -50,6 +55,7 @@ public interface OrderDao {
/**
* 快递员获取任务列表
*
* @param orderSelect
* @return
*/
@ -57,6 +63,7 @@ public interface OrderDao {
/**
* 快递员获取任务列表总数
*
* @param orderSelect
* @param courierId
* @return
@ -65,6 +72,7 @@ public interface OrderDao {
/**
* 快递员获取自己任务列表
*
* @param orderSelect
* @param courierId
* @return
@ -73,6 +81,7 @@ public interface OrderDao {
/**
* 快递员获取自己任务列表总数
*
* @param orderSelect
* @return
*/
@ -80,6 +89,7 @@ public interface OrderDao {
/**
* 通过id查询订单状态
*
* @param id
* @return
*/
@ -87,6 +97,7 @@ public interface OrderDao {
/**
* 修改订单状态
*
* @param orderModifyState
* @return
*/
@ -96,6 +107,7 @@ public interface OrderDao {
/**
* 快递员送达快递切换状态
*
* @param orderModifyState
* @return
*/
@ -103,6 +115,7 @@ public interface OrderDao {
/**
* 客户收取快递
*
* @param orderModifyState
* @return
*/
@ -110,6 +123,7 @@ public interface OrderDao {
/**
* 删除订单
*
* @param orderid
* @return
*/

View File

@ -15,12 +15,15 @@ public interface PriceDao {
/**
* 删除价格
*
* @param id
* @return
*/
Integer deletePrice(@Param("id") Integer id);
/**
* 新增价格表
*
* @param price
* @return
*/
@ -28,12 +31,14 @@ public interface PriceDao {
/**
* 获取快递类型
*
* @return
*/
List<Price> queryAllPrice();
/**
* 通过id获取快递类型对应价格
*
* @param id
* @return
*/
@ -41,6 +46,7 @@ public interface PriceDao {
/**
* 修改价格
*
* @param price
* @return
*/

View File

@ -17,12 +17,14 @@ public class AccountExecution {
private int count;
private int state;
private String stateInfo;
public AccountExecution() {
}
/**
* 获取单个的构造器
*
* @param account
* @param loginEnum
*/
@ -34,6 +36,7 @@ public class AccountExecution {
/**
* 获取多个的构造器
*
* @param accountList
* @param loginEnum
* @param count
@ -47,6 +50,7 @@ public class AccountExecution {
/**
* 失败的构造器
*
* @param loginEnum
*/
public AccountExecution(LoginEnum loginEnum) {

View File

@ -15,6 +15,7 @@ public class OrderCourier extends Order {
public OrderCourier() {
}
public String getFlats() {
return flats;
}

View File

@ -17,8 +17,6 @@ public class OrderModifyState {
private Integer paymentStatus;
public OrderModifyState(Integer id, Integer courierId, Integer status) {
this.id = id;
this.courierId = courierId;

View File

@ -30,7 +30,6 @@ public class Account {
private String ncryptedAnswers;
public Account() {
}

View File

@ -8,7 +8,8 @@ package live.tomey.api.express.enums;
*/
public enum OrderEnum {
OFFLINE(-1, "系统错误"),EREE(3, "操作失败"),SUCCESS(1, "操作成功"),NULL(2, "查询结果为空"),NO_POWER(-2,"您没有权限!"),GETON(2,"无效操作"),;
OFFLINE(-1, "系统错误"), EREE(3, "操作失败"), SUCCESS(1, "操作成功"), NULL(2, "查询结果为空"), NO_POWER(-2, "您没有权限!"), GETON(2, "无效操作"),
;
private int state;

View File

@ -125,6 +125,7 @@ public class AuthenticationInterceptor extends HandlerInterceptorAdapter {
return true;
}
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) {
// HandlerMethod handlerMethod = (HandlerMethod) handler;

View File

@ -16,6 +16,7 @@ public interface AccountService {
/**
* 设置密保
*
* @param account
* @return
*/
@ -23,6 +24,7 @@ public interface AccountService {
/**
* 检查是否存在密保
*
* @param phone
* @return
*/
@ -31,12 +33,14 @@ public interface AccountService {
/**
* 获取所有用户信息
*
* @return
*/
AccountRootExcution getAllAccount(AccountSelect accountSelect);
/**
* 通过电话查询用户信息
*
* @param phone
* @return
*/
@ -44,6 +48,7 @@ public interface AccountService {
/**
* 添加用户
*
* @param account
* @return
*/
@ -51,6 +56,7 @@ public interface AccountService {
/**
* 超级管理员修改用户权限
*
* @param id
* @param identityId
* @return
@ -59,6 +65,7 @@ public interface AccountService {
/**
* 修改密码
*
* @param id
* @param password
* @return
@ -67,6 +74,7 @@ public interface AccountService {
/**
* 完善用户信息
*
* @param account
* @return
*/

View File

@ -14,6 +14,7 @@ import live.tomey.api.express.entity.Complaint;
public interface ComplaintService {
/**
* 新增投诉与建议
*
* @param complaint
* @return
*/
@ -21,6 +22,7 @@ public interface ComplaintService {
/**
* 获取投诉与建议
*
* @param complaintSelect
* @return
*/
@ -28,6 +30,7 @@ public interface ComplaintService {
/**
* 阅读投诉与建议
*
* @param id
* @return
*/
@ -35,6 +38,7 @@ public interface ComplaintService {
/**
* 删除投诉与建议
*
* @param id
* @return
*/

View File

@ -21,6 +21,4 @@ public interface FlatsService {
List<Flats> getAllFlats();
}

View File

@ -27,6 +27,7 @@ public class DataShowServiceImpl implements DataShowService {
/**
* 管理员获取订单数据
*
* @return
*/
@Override
@ -46,6 +47,7 @@ public class DataShowServiceImpl implements DataShowService {
/**
* 快递员获取订单数据
*
* @param courierId
* @return
*/
@ -66,6 +68,7 @@ public class DataShowServiceImpl implements DataShowService {
/**
* 用户获取订单数据
*
* @param selfId
* @return
*/

View File

@ -25,6 +25,7 @@ public class FlatsServiceImpl implements FlatsService {
/**
* 添加公寓
*
* @param flats
* @return
*/
@ -40,6 +41,7 @@ public class FlatsServiceImpl implements FlatsService {
/**
* 删除公寓
*
* @param id
* @return
*/
@ -55,6 +57,7 @@ public class FlatsServiceImpl implements FlatsService {
/**
* 修改公寓
*
* @param flats
* @return
*/
@ -70,6 +73,7 @@ public class FlatsServiceImpl implements FlatsService {
/**
* 获取所有公寓
*
* @return
*/
@Override

View File

@ -100,6 +100,7 @@ public class DESUtil {
throw new RuntimeException(e);
}
}
public static void main(String[] args) {
// System.out.println(getEncryptString("123456789"));
// System.out.println(getEncryptString("jdbc:mysql://34.96.189.60:3306/mall?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true"));

View File

@ -14,7 +14,6 @@ public class HttpServletRequestUtil {
}
public static Date getDate(HttpServletRequest request, String key) {
String datetime = request.getParameter(key);//获取表单信息
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");//设置为指定格式
@ -24,6 +23,7 @@ public class HttpServletRequestUtil {
return null;
}
}
public static long getLong(HttpServletRequest request, String key) {
try {
return Long.valueOf(request.getParameter(key));