| | |
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import com.yeshi.fanli.entity.accept.AdminAcceptData;
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "query")
|
| | | public void query(String callback, Integer pageIndex, Integer pageSize, String key, Integer state, PrintWriter out) {
|
| | | public void query(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key, Integer state, PrintWriter out) {
|
| | | if (pageIndex == null || pageIndex < 1) {
|
| | | pageIndex = 1;
|
| | | }
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "getApplyInfo")
|
| | | public void getAuditInfo(String callback, Long id, PrintWriter out) {
|
| | | public void getAuditInfo(AdminAcceptData acceptData,String callback, Long id, PrintWriter out) {
|
| | | RedPackExchange exchange = redPackExchangeService.selectByPrimaryKey(id);
|
| | | if (exchange == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("申请记录不存在"));
|
| | |
| | | * @param request
|
| | | */
|
| | | @RequestMapping(value = "passExchange")
|
| | | public void passExchange(String callback, Long id, String code, PrintWriter out, HttpServletRequest request) {
|
| | | public void passExchange(AdminAcceptData acceptData,String callback, Long id, String code, PrintWriter out, HttpServletRequest request) {
|
| | | try {
|
| | | /* 检验是否登陆 */
|
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
|
| | |
| | | * @param request
|
| | | */
|
| | | @RequestMapping(value = "rejectExchange")
|
| | | public void rejectExchange(String callback, Long id, String code, String reason, PrintWriter out,
|
| | | public void rejectExchange(AdminAcceptData acceptData,String callback, Long id, String code, String reason, PrintWriter out,
|
| | | HttpServletRequest request) {
|
| | | try {
|
| | | /* 检验是否登陆 */
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 红包统计
|
| | | * @param callback
|
| | | * @param uid
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "statisticsRedPack")
|
| | | public void statisticsRedPack(AdminAcceptData acceptData,String callback, Long uid, PrintWriter out) {
|
| | | try {
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("balance", redPackBalanceService.getBalance(uid));
|
| | | data.put("exchanging", redPackExchangeService.countByUidAndState(uid, RedPackExchange.STATE_INIT));
|
| | | data.put("exchangeSucceed", redPackExchangeService.countByUidAndState(uid, RedPackExchange.STATE_SUCCESS));
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
|
| | | } catch (Exception e) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("操作异常"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|