| | |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi</artifactId> |
| | | <version>RELEASE</version> |
| | | <version>5.0.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.poi</groupId> |
| | | <artifactId>poi-ooxml</artifactId> |
| | | <version>RELEASE</version> |
| | | <version>5.0.0</version> |
| | | </dependency> |
| | | |
| | | <!--shiro依赖--> |
| | |
| | | <groupId>io.jsonwebtoken</groupId> |
| | | <artifactId>jjwt</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>commons-io</groupId> |
| | | <artifactId>commons-io</artifactId> |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.modular.system.controller.util.ExcelUtil; |
| | | import com.stylefeng.guns.modular.system.enums.CouponStatusEnum; |
| | | import com.stylefeng.guns.modular.system.exports.TAppUserExceptionExport; |
| | | import com.stylefeng.guns.modular.system.model.TAppUser; |
| | | import com.stylefeng.guns.modular.system.model.TCoupon; |
| | | import com.stylefeng.guns.modular.system.service.ITAppUserService; |
| | | import com.stylefeng.guns.modular.system.service.ITCouponService; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.OutputStream; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-14 08:55:42 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tAppUser") |
| | | public class TAppUserController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tAppUser/"; |
| | | |
| | | @Autowired |
| | | private ITAppUserService tAppUserService; |
| | | @Autowired |
| | | private ITCouponService tCouponService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tAppUser.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tAppUser_add") |
| | | public String tAppUserAdd() { |
| | | return PREFIX + "tAppUser_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 赠送优惠券查询页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/sendCoupon") |
| | | public String sendCoupon( String userIds,Model model) { |
| | | model.addAttribute("userIds",userIds); |
| | | return PREFIX + "tCoupon.html"; |
| | | } |
| | | |
| | | /** |
| | | * 赠送优惠券查询页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/sendCouponException") |
| | | public String sendCouponException( String userIds,Model model) { |
| | | model.addAttribute("userIds",userIds); |
| | | return PREFIX + "tCouponException.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转异常用户页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tAppUser_exception") |
| | | public String tAppUserException(Integer isException,Model model) { |
| | | isException = 2; |
| | | model.addAttribute("isException",isException); |
| | | return PREFIX + "tAppUserException.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转冻结页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tAppUser_start_and_stop") |
| | | public String tAppUserStartAndStop( Integer id, |
| | | Model model) { |
| | | TAppUser tAppUser = tAppUserService.selectById(id); |
| | | |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("status",tAppUser.getStatus()); |
| | | return PREFIX + "tAppUserStartAndStop.html"; |
| | | } |
| | | |
| | | /** |
| | | * 异常页面跳转冻结页面 |
| | | * @return |
| | | */ |
| | | @RequestMapping("/tAppUserException_start_and_stop") |
| | | public String tAppUserExceptionStartAndStop( Integer id, |
| | | Model model) { |
| | | TAppUser tAppUser = tAppUserService.selectById(id); |
| | | |
| | | model.addAttribute("id",id); |
| | | model.addAttribute("status",tAppUser.getStatus()); |
| | | return PREFIX + "tAppUserStartAndStopException.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tAppUser_update/{tAppUserId}") |
| | | public String tAppUserUpdate(@PathVariable Integer tAppUserId, Model model) { |
| | | TAppUser tAppUser = tAppUserService.selectById(tAppUserId); |
| | | model.addAttribute("item",tAppUser); |
| | | LogObjectHolder.me().set(tAppUser); |
| | | return PREFIX + "tAppUser_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转详情页面 |
| | | */ |
| | | @RequestMapping("/userDetail") |
| | | public String userDetail(Integer tAppUserId, Model model) { |
| | | tAppUserService.detail(tAppUserId,model); |
| | | |
| | | return PREFIX + "tAppUserDetail.html"; |
| | | } |
| | | |
| | | /** |
| | | * 异常页面跳转详情页面 |
| | | */ |
| | | @RequestMapping("/userDetailException") |
| | | public String userDetailException(Integer tAppUserId, Model model) { |
| | | tAppUserService.detail(tAppUserId,model); |
| | | return PREFIX + "tAppUserDetailException.html"; |
| | | } |
| | | |
| | | @ApiOperation(value = "异常用户页面列表") |
| | | @RequestMapping("/exceptionUserList") |
| | | @ResponseBody |
| | | public Object exceptionUserList(String createTime, |
| | | String nickname, |
| | | String phone, |
| | | Integer id, |
| | | Integer status) { |
| | | |
| | | EntityWrapper<TAppUser> wrapper = tAppUserService.getUserListWrapper(createTime,nickname,phone,id,status); |
| | | // 是否异常 |
| | | wrapper.eq("is_exception",2); |
| | | return tAppUserService.selectList(wrapper); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "用户页面列表") |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object getList(String createTime, |
| | | String nickname, |
| | | String phone, |
| | | Integer id, |
| | | Integer status) { |
| | | EntityWrapper<TAppUser> wrapper = tAppUserService.getUserListWrapper(createTime,nickname,phone,id,status); |
| | | return tAppUserService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | return tAppUserService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TAppUser tAppUser) { |
| | | tAppUserService.insert(tAppUser); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tAppUserId) { |
| | | tAppUserService.deleteById(tAppUserId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update-status") |
| | | @ResponseBody |
| | | public Object updateStatus(Integer id, |
| | | Integer status, |
| | | String remark) { |
| | | TAppUser tAppUser = tAppUserService.selectById(id); |
| | | if(1 == status){ |
| | | tAppUser.setStatus(2); |
| | | } |
| | | if(2 == status){ |
| | | tAppUser.setStatus(1); |
| | | } |
| | | tAppUser.setRemark(remark); |
| | | tAppUserService.updateById(tAppUser); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TAppUser tAppUser) { |
| | | tAppUserService.updateById(tAppUser); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tAppUserId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tAppUserId") Integer tAppUserId) { |
| | | return tAppUserService.selectById(tAppUserId); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出用户列表",notes="导出用户列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | @RequestMapping(value = "/export-userInfo") |
| | | @ResponseBody |
| | | public void exportUserInfo(String createTime, |
| | | String nickname, |
| | | String phone, |
| | | Integer id, |
| | | Integer status, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "UserInfo"+time1+".xls"; |
| | | String[] title = new String[] {"用户ID","用户昵称","手机号","性别","头像","微信openid", |
| | | "微信unionid","紧急联系人","紧急联系电话","账户余额","用户标签id","状态","添加时间"}; |
| | | EntityWrapper<TAppUser> wrapper = tAppUserService.getUserListWrapper(createTime,nickname,phone,id,status); |
| | | // 是否异常 |
| | | wrapper.eq("is_exception",2); |
| | | List<TAppUser> list = tAppUserService.selectList(wrapper); |
| | | |
| | | String[][] values = new String[list.size()][]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | TAppUser d = list.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = d.getId().toString(); |
| | | values[i][1] = d.getNickname(); |
| | | values[i][2] = d.getPhone(); |
| | | Integer sex = d.getSex(); |
| | | if(1 == sex){ |
| | | values[i][3] = "男"; |
| | | }else if(2 == sex){ |
| | | values[i][3] = "女"; |
| | | }else { |
| | | values[i][3] = "未知"; |
| | | } |
| | | values[i][4] = d.getAvatar(); |
| | | values[i][5] = d.getOpenid(); |
| | | values[i][6] = d.getUnionid(); |
| | | values[i][7] = d.getEmergencyContact(); |
| | | values[i][8] = d.getEmergencyPhone(); |
| | | values[i][9] = d.getAccountBalance().toString(); |
| | | values[i][10] = d.getUserTagId().toString(); |
| | | Integer status1 = d.getStatus(); |
| | | if(1 == status1){ |
| | | values[i][11] = "正常"; |
| | | }else if(2 == status1){ |
| | | values[i][11] = "冻结"; |
| | | }else { |
| | | values[i][11] = "删除"; |
| | | } |
| | | values[i][12] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "导出异常用户列表",notes="导出异常用户列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | @RequestMapping(value = "/export-exceptionUserInfo") |
| | | @ResponseBody |
| | | public void exportExceptionUserInfo(String createTime, |
| | | String nickname, |
| | | String phone, |
| | | Integer id, |
| | | Integer status, HttpServletResponse response) { |
| | | try { |
| | | Date date = new Date(); |
| | | DateFormat format = new SimpleDateFormat("yyyyMMdd"); |
| | | String time1 = format.format(date); |
| | | String fileName = "ExceptionUserInfo"+time1+".xls"; |
| | | String[] title = new String[] {"注册时间","用户ID","用户昵称","手机号","剩余优惠券","优惠券总数", |
| | | "消费次数","历史消费","最后一次消费时间","状态"}; |
| | | EntityWrapper<TAppUser> wrapper = tAppUserService.getUserListWrapper(createTime,nickname,phone,id,status); |
| | | // 是否异常 |
| | | wrapper.eq("is_exception",2); |
| | | List<TAppUser> list = tAppUserService.selectList(wrapper); |
| | | |
| | | List<TAppUserExceptionExport> exportList = new ArrayList<>(list.size()); |
| | | for (TAppUser tAppUser : list) { |
| | | TAppUserExceptionExport export = new TAppUserExceptionExport(); |
| | | BeanUtils.copyProperties(tAppUser,export); |
| | | // 查询优惠券 |
| | | List<TCoupon> tCoupons = tCouponService.selectList(new EntityWrapper<TCoupon>().eq("user_id", tAppUser.getId())); |
| | | // 优惠券总数 |
| | | export.setCouponsSum(tCoupons.size()); |
| | | tCoupons = tCoupons.stream().filter(coupon->coupon.getCouponStatus().equals(CouponStatusEnum.NOT_USED.getCode())).collect(Collectors.toList()); |
| | | // 剩余优惠券 |
| | | export.setRemainingCoupons(tCoupons.size()); |
| | | // TODO 查询消费记录 |
| | | exportList.add(export); |
| | | } |
| | | String[][] values = new String[list.size()][]; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | TAppUserExceptionExport d = exportList.get(i); |
| | | values[i] = new String[title.length]; |
| | | values[i][0] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getCreateTime()); |
| | | values[i][1] = d.getId().toString(); |
| | | values[i][2] = d.getNickname(); |
| | | values[i][3] = d.getPhone(); |
| | | values[i][4] = d.getRemainingCoupons().toString(); |
| | | values[i][5] = d.getCouponsSum().toString(); |
| | | values[i][6] = d.getConsumptionTimes().toString(); |
| | | values[i][7] = d.getHistoricalConsumption().toString(); |
| | | if(Objects.nonNull(d.getLastConsumptionTime())){ |
| | | values[i][8] = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(d.getLastConsumptionTime()); |
| | | }else { |
| | | values[i][8] = ""; |
| | | } |
| | | Integer status1 = d.getStatus(); |
| | | if(1 == status1){ |
| | | values[i][9] = "正常"; |
| | | }else if(2 == status1){ |
| | | values[i][9] = "冻结"; |
| | | }else { |
| | | values[i][9] = "删除"; |
| | | } |
| | | } |
| | | HSSFWorkbook wb = ExcelUtil.getHSSFWorkbook("Variance"+time1, title, values, null); |
| | | ExcelUtil.setResponseHeader(response, fileName); |
| | | OutputStream os = response.getOutputStream(); |
| | | wb.write(os); |
| | | os.flush(); |
| | | os.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.controller.req.CouponSendReq; |
| | | import com.stylefeng.guns.modular.system.enums.CouponStatusEnum; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.Assert; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TCoupon; |
| | | import com.stylefeng.guns.modular.system.service.ITCouponService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-14 10:59:23 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tCoupon") |
| | | public class TCouponController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tCoupon/"; |
| | | |
| | | @Autowired |
| | | private ITCouponService tCouponService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tCoupon.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tCoupon_add") |
| | | public String tCouponAdd() { |
| | | return PREFIX + "tCoupon_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tCoupon_update/{tCouponId}") |
| | | public String tCouponUpdate(@PathVariable Integer tCouponId, Model model) { |
| | | TCoupon tCoupon = tCouponService.selectById(tCouponId); |
| | | model.addAttribute("item",tCoupon); |
| | | LogObjectHolder.me().set(tCoupon); |
| | | return PREFIX + "tCoupon_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition) { |
| | | EntityWrapper<TCoupon> wrapper = new EntityWrapper<>(); |
| | | if(StringUtils.hasLength(condition)){ |
| | | wrapper.like("coupon_name",condition); |
| | | } |
| | | wrapper.groupBy(true,"coupon_name"); |
| | | return tCouponService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tCouponService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TCoupon tCoupon) { |
| | | tCouponService.insert(tCoupon); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tCouponId) { |
| | | tCouponService.deleteById(tCouponId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TCoupon tCoupon) { |
| | | tCouponService.updateById(tCoupon); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tCouponId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tCouponId") Integer tCouponId) { |
| | | return tCouponService.selectById(tCouponId); |
| | | } |
| | | |
| | | /** |
| | | * 发放优惠券 |
| | | */ |
| | | @ApiOperation(value = "发放优惠券") |
| | | @RequestMapping(value = "/sendCouponToUser") |
| | | @ResponseBody |
| | | public Object sendCouponToUser(CouponSendReq couponSendReq) { |
| | | |
| | | List<Integer> userIds = couponSendReq.getUserIds(); |
| | | |
| | | // 查询该优惠券的列表 |
| | | List<TCoupon> tCoupons = tCouponService.selectList(new EntityWrapper<TCoupon>().eq("coupon_name", couponSendReq.getCouponName()) |
| | | .eq("coupon_status",CouponStatusEnum.UNISSUED.getCode())); |
| | | Assert.isTrue(!CollectionUtils.isEmpty(tCoupons),"该优惠券不存在!"); |
| | | List<TCoupon> tCouponList = new ArrayList<>(); |
| | | // 判断是选中的人多还是优惠券的数量较多 |
| | | if(tCoupons.size() > userIds.size()){ |
| | | for (Integer userId : userIds) { |
| | | Iterator<TCoupon> iterator = tCoupons.iterator(); |
| | | while (iterator.hasNext()){ |
| | | TCoupon next = iterator.next(); |
| | | next.setCouponStatus(CouponStatusEnum.NOT_USED.getCode()); |
| | | next.setUserId(userId); |
| | | tCouponList.add(next); |
| | | iterator.remove(); |
| | | break; |
| | | } |
| | | } |
| | | }else { |
| | | for (TCoupon tCoupon : tCoupons) { |
| | | Iterator<Integer> iterator = userIds.iterator(); |
| | | while (iterator.hasNext()){ |
| | | tCoupon.setCouponStatus(CouponStatusEnum.NOT_USED.getCode()); |
| | | tCoupon.setUserId(iterator.next()); |
| | | tCouponList.add(tCoupon); |
| | | iterator.remove(); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if(!CollectionUtils.isEmpty(tCouponList)){ |
| | | tCouponService.updateBatchById(tCouponList); |
| | | } |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.modular.system.controller.resp.TAppUserDetailOrderResp; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderService; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * 控制器 |
| | | * |
| | | * @author fengshuonan |
| | | * @Date 2023-02-15 11:57:13 |
| | | */ |
| | | @Controller |
| | | @RequestMapping("/tOrder") |
| | | public class TOrderController extends BaseController { |
| | | |
| | | private String PREFIX = "/system/tOrder/"; |
| | | |
| | | @Autowired |
| | | private ITOrderService tOrderService; |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | | @RequestMapping("") |
| | | public String index() { |
| | | return PREFIX + "tOrder.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到添加 |
| | | */ |
| | | @RequestMapping("/tOrder_add") |
| | | public String tOrderAdd() { |
| | | return PREFIX + "tOrder_add.html"; |
| | | } |
| | | |
| | | /** |
| | | * 跳转到修改 |
| | | */ |
| | | @RequestMapping("/tOrder_update/{tOrderId}") |
| | | public String tOrderUpdate(@PathVariable Integer tOrderId, Model model) { |
| | | TOrder tOrder = tOrderService.selectById(tOrderId); |
| | | model.addAttribute("item",tOrder); |
| | | LogObjectHolder.me().set(tOrder); |
| | | return PREFIX + "tOrder_edit.html"; |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "获取订单列表") |
| | | @RequestMapping(value = "/list") |
| | | @ResponseBody |
| | | public Object list(String condition,Integer userId) { |
| | | EntityWrapper<TOrder> wrapper = new EntityWrapper<>(); |
| | | if(Objects.nonNull(userId)){ |
| | | wrapper.eq("user_id",userId); |
| | | } |
| | | return tOrderService.selectList(wrapper); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @ApiOperation(value = "获取用户详情里的订单列表") |
| | | @RequestMapping(value = "/appUserDetailList") |
| | | @ResponseBody |
| | | public Object appUserDetailList(String condition,Integer userId) { |
| | | List<TAppUserDetailOrderResp> list = new ArrayList<>(); |
| | | |
| | | |
| | | EntityWrapper<TOrder> wrapper = new EntityWrapper<>(); |
| | | if(Objects.nonNull(userId)){ |
| | | wrapper.eq("user_id",userId); |
| | | } |
| | | List<TOrder> tOrders = tOrderService.selectList(wrapper); |
| | | for (TOrder tOrder : tOrders) { |
| | | TAppUserDetailOrderResp tAppUserDetailOrderResp = new TAppUserDetailOrderResp(); |
| | | BeanUtils.copyProperties(tOrder,tAppUserDetailOrderResp); |
| | | |
| | | // TODO 查询里程数等参数 |
| | | |
| | | list.add(tAppUserDetailOrderResp); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | | @RequestMapping(value = "/list-back") |
| | | @ResponseBody |
| | | public Object listBack(String condition) { |
| | | return tOrderService.selectList(null); |
| | | } |
| | | |
| | | /** |
| | | * 新增 |
| | | */ |
| | | @RequestMapping(value = "/add") |
| | | @ResponseBody |
| | | public Object add(TOrder tOrder) { |
| | | tOrderService.insert(tOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @RequestMapping(value = "/delete") |
| | | @ResponseBody |
| | | public Object delete(@RequestParam Integer tOrderId) { |
| | | tOrderService.deleteById(tOrderId); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | */ |
| | | @RequestMapping(value = "/update") |
| | | @ResponseBody |
| | | public Object update(TOrder tOrder) { |
| | | tOrderService.updateById(tOrder); |
| | | return SUCCESS_TIP; |
| | | } |
| | | |
| | | /** |
| | | * 详情 |
| | | */ |
| | | @RequestMapping(value = "/detail/{tOrderId}") |
| | | @ResponseBody |
| | | public Object detail(@PathVariable("tOrderId") Integer tOrderId) { |
| | | return tOrderService.selectById(tOrderId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.req; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @ApiModel(value = "优惠券发放的Req") |
| | | public class CouponSendReq implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "用户id集合") |
| | | private List<Integer> userIds; |
| | | |
| | | @ApiModelProperty(value = "优惠券名称") |
| | | private String couponName; |
| | | |
| | | public List<Integer> getUserIds() { |
| | | return userIds; |
| | | } |
| | | |
| | | public void setUserIds(List<Integer> userIds) { |
| | | this.userIds = userIds; |
| | | } |
| | | |
| | | public String getCouponName() { |
| | | return couponName; |
| | | } |
| | | |
| | | public void setCouponName(String couponName) { |
| | | this.couponName = couponName; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.req; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | |
| | | public class TAppUserReq implements Serializable { |
| | | |
| | | private Date startTime; |
| | | |
| | | private Date endTime; |
| | | |
| | | private Integer id; |
| | | |
| | | private String nickName; |
| | | |
| | | private String phone; |
| | | |
| | | private Integer status; |
| | | |
| | | public TAppUserReq() { |
| | | } |
| | | |
| | | public TAppUserReq(Date startTime, Date endTime, Integer id, String nickName, String phone, Integer status) { |
| | | this.startTime = startTime; |
| | | this.endTime = endTime; |
| | | this.id = id; |
| | | this.nickName = nickName; |
| | | this.phone = phone; |
| | | this.status = status; |
| | | } |
| | | |
| | | public Date getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public Date getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getNickName() { |
| | | return nickName; |
| | | } |
| | | |
| | | public void setNickName(String nickName) { |
| | | this.nickName = nickName; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TAppUserReq{" + |
| | | "startTime=" + startTime + |
| | | ", endTime=" + endTime + |
| | | ", id=" + id + |
| | | ", nickName='" + nickName + '\'' + |
| | | ", phone='" + phone + '\'' + |
| | | ", status=" + status + |
| | | '}'; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.resp; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | public class TAppUserDetailOrderResp extends TOrder { |
| | | |
| | | @ApiModelProperty(value = "总行驶里程(公里)") |
| | | private Integer mileageSum; |
| | | |
| | | @ApiModelProperty(value = "总行驶时间(分)") |
| | | private Integer travelTimeSum; |
| | | |
| | | @ApiModelProperty(value = "基础费用(元)") |
| | | private BigDecimal basicExpenses; |
| | | |
| | | // @ApiModelProperty(value = "等待时间(5)分钟") |
| | | // private BigDecimal waitTimePrice; |
| | | |
| | | @ApiModelProperty(value = "里程费(8.0)公里") |
| | | private BigDecimal mileagePrice; |
| | | |
| | | @ApiModelProperty(value = "恶劣天气") |
| | | private Integer badWeather; |
| | | |
| | | public Integer getMileageSum() { |
| | | return mileageSum; |
| | | } |
| | | |
| | | public void setMileageSum(Integer mileageSum) { |
| | | this.mileageSum = mileageSum; |
| | | } |
| | | |
| | | public Integer getTravelTimeSum() { |
| | | return travelTimeSum; |
| | | } |
| | | |
| | | public void setTravelTimeSum(Integer travelTimeSum) { |
| | | this.travelTimeSum = travelTimeSum; |
| | | } |
| | | |
| | | public BigDecimal getBasicExpenses() { |
| | | return basicExpenses; |
| | | } |
| | | |
| | | public void setBasicExpenses(BigDecimal basicExpenses) { |
| | | this.basicExpenses = basicExpenses; |
| | | } |
| | | |
| | | public BigDecimal getMileagePrice() { |
| | | return mileagePrice; |
| | | } |
| | | |
| | | public void setMileagePrice(BigDecimal mileagePrice) { |
| | | this.mileagePrice = mileagePrice; |
| | | } |
| | | |
| | | public Integer getBadWeather() { |
| | | return badWeather; |
| | | } |
| | | |
| | | public void setBadWeather(Integer badWeather) { |
| | | this.badWeather = badWeather; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.google.code.kaptcha.Constants; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.constant.Const; |
| | | import com.stylefeng.guns.core.common.exception.InvalidKaptchaException; |
| | | import com.stylefeng.guns.core.log.LogManager; |
| | | import com.stylefeng.guns.core.log.factory.LogTaskFactory; |
| | | import com.stylefeng.guns.core.node.MenuNode; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.shiro.factory.IShiro; |
| | | import com.stylefeng.guns.core.shiro.factory.ShiroFactroy; |
| | | import com.stylefeng.guns.core.util.ApiMenuFilter; |
| | | import com.stylefeng.guns.core.util.KaptchaUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | |
| | | import com.stylefeng.guns.modular.system.service.IMenuService; |
| | | import com.stylefeng.guns.modular.system.service.IUserService; |
| | | import com.stylefeng.guns.modular.system.util.AESUtils; |
| | | import org.apache.shiro.authc.SimpleAuthenticationInfo; |
| | | import org.apache.shiro.authc.UsernamePasswordToken; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | * 跳转到登录页面 |
| | | */ |
| | | @RequestMapping(value = "/login", method = RequestMethod.GET) |
| | | public String login() { |
| | | public String login(Model model) { |
| | | model.addAttribute("number",0); |
| | | if (ShiroKit.isAuthenticated() || ShiroKit.getUser() != null) { |
| | | return REDIRECT + "/"; |
| | | } else { |
| | |
| | | |
| | | Integer f = loginFailures.get(username); |
| | | f = f == null ? 0 : f; |
| | | Long t = loginTime.get(username); |
| | | t = null == t ? 0 : t; |
| | | if(System.currentTimeMillis() - t > (30 * 60 * 1000)){ |
| | | loginFailures.put(username, f = 1); |
| | | loginTime.put(username, System.currentTimeMillis()); |
| | | }else{ |
| | | // 校验账号,密码是否正确,如果错误,对次数进行加1 |
| | | IShiro shiroFactory = ShiroFactroy.me(); |
| | | User user = userService.getByAccount(username); |
| | | password = AESUtils.decrypt(password); |
| | | if(null == user){ |
| | | f++; |
| | | loginFailures.put(username, f); |
| | | }else { |
| | | // 校验密码 |
| | | ShiroUser shiroUser1 = shiroFactory.shiroUser(user); |
| | | SimpleAuthenticationInfo info = shiroFactory.info(shiroUser1, user, username); |
| | | System.out.println(info.getCredentials()); |
| | | String pass = ShiroKit.md5(password, user.getSalt()); |
| | | System.out.println(pass); |
| | | if(!info.getCredentials().equals(pass)){ |
| | | f++; |
| | | loginFailures.put(username, f); |
| | | if(f<5){ |
| | | model.addAttribute("number", "3"); |
| | | } |
| | | |
| | | if(f > 5 && (System.currentTimeMillis() - t) <= (30 * 60 * 1000)){ |
| | | model.addAttribute("tips", "登录次数过多,请等30分钟再试!"); |
| | | if(f==5){ |
| | | model.addAttribute("number", "5"); |
| | | } |
| | | return "/login.html"; |
| | | } |
| | | //验证验证码是否正确 |
| | | } |
| | | model.addAttribute("number", "3"); |
| | | /*if(f > 5 ){ |
| | | model.addAttribute("tips", "登录次数过多,请等30分钟再试!"); |
| | | if (KaptchaUtil.getKaptchaOnOff()) { |
| | | String kaptcha = super.getPara("kaptcha").trim(); |
| | | String code = (String) super.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY); |
| | |
| | | throw new InvalidKaptchaException(); |
| | | } |
| | | } |
| | | password = AESUtils.decrypt(password); |
| | | return "/login.html"; |
| | | }*/ |
| | | //验证验证码是否正确 |
| | | // if (KaptchaUtil.getKaptchaOnOff()) { |
| | | // String kaptcha = super.getPara("kaptcha").trim(); |
| | | // String code = (String) super.getSession().getAttribute(Constants.KAPTCHA_SESSION_KEY); |
| | | // if (ToolUtil.isEmpty(kaptcha) || !kaptcha.equalsIgnoreCase(code)) { |
| | | // throw new InvalidKaptchaException(); |
| | | // } |
| | | // } |
| | | Subject currentUser = ShiroKit.getSubject(); |
| | | UsernamePasswordToken token = new UsernamePasswordToken(username, password.toCharArray()); |
| | | |
| | |
| | | // } else { |
| | | // token.setRememberMe(false); |
| | | // } |
| | | |
| | | token.setRememberMe(false);//关闭记住我功能 |
| | | |
| | | currentUser.login(token); |
| | | |
| | | // 登录成功,错误次数值改0 |
| | | loginFailures.put(username, 0); |
| | | |
| | | ShiroUser shiroUser = ShiroKit.getUser(); |
| | | super.getSession().setAttribute("shiroUser", shiroUser); |
| | | super.getSession().setAttribute("username", shiroUser.getAccount()); |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.util; |
| | | |
| | | |
| | | import org.apache.poi.hssf.usermodel.*; |
| | | import org.apache.poi.ss.usermodel.CellType; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | public class ExcelUtil { |
| | | public static HSSFWorkbook getHSSFWorkbook(String sheetName, String[] title, String[][] values, HSSFWorkbook wb) { |
| | | // 第一步,创建一个webbook,对应一个Excel文件 |
| | | if (wb == null) { |
| | | wb = new HSSFWorkbook(); |
| | | } |
| | | // 第二步,在webbook中添加一个sheet,对应Excel文件中的sheet |
| | | HSSFSheet sheet = wb.createSheet(sheetName); |
| | | // 第三步,在sheet中添加表头第0行,注意老版本poi对Excel的行数列数有限制short |
| | | HSSFRow row = sheet.createRow(0); |
| | | // 第四步,创建单元格,并设置值表头 设置表头居中 |
| | | HSSFCellStyle style = wb.createCellStyle(); |
| | | style.setAlignment(HorizontalAlignment.CENTER); // 创建一个居中格式 |
| | | |
| | | HSSFCell cell = null; |
| | | // 创建标题 |
| | | for (int i = 0; i < title.length; i++) { |
| | | cell = row.createCell(i); |
| | | cell.setCellType(CellType.STRING); |
| | | cell.setCellValue(title[i]); |
| | | cell.setCellStyle(style); |
| | | } |
| | | if(values!=null){ |
| | | // 创建内容 |
| | | for (int i = 0; i < values.length; i++) { |
| | | row = sheet.createRow(i + 1); |
| | | for (int j = 0; j < values[i].length; j++) { |
| | | row.createCell(j).setCellValue(values[i][j]); |
| | | } |
| | | } |
| | | |
| | | } |
| | | return wb; |
| | | } |
| | | |
| | | public static void setResponseHeader(HttpServletResponse response, String fileName) { |
| | | try { |
| | | response.setHeader("Content-Disposition", "attachment;filename=" + fileName); |
| | | response.setContentType("application/vnd.ms-excel;charset=UTF-8"); |
| | | response.addHeader("Pragma", "no-cache"); |
| | | response.addHeader("Cache-Control", "no-cache"); |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.controller.util; |
| | | |
| | | |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | | import org.springframework.web.context.request.ServletRequestAttributes; |
| | | |
| | | import javax.servlet.http.Cookie; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.servlet.http.HttpSession; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * web工具类 |
| | | * |
| | | * @author ck |
| | | */ |
| | | public final class WebUtils extends org.springframework.web.util.WebUtils { |
| | | |
| | | /** |
| | | * 当前请求 |
| | | */ |
| | | public static HttpServletRequest request() { |
| | | return contextHolder() == null ? null : contextHolder().getRequest(); |
| | | } |
| | | |
| | | /** |
| | | * 当前响应 |
| | | */ |
| | | public static HttpServletResponse response() { |
| | | return contextHolder() == null ? null : contextHolder().getResponse(); |
| | | } |
| | | |
| | | /** |
| | | * 当前session |
| | | */ |
| | | public static HttpSession session() { |
| | | return request() == null ? null : request().getSession(); |
| | | } |
| | | |
| | | /** |
| | | * 当前ServletRequest |
| | | */ |
| | | public static ServletRequestAttributes contextHolder() { |
| | | return (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); |
| | | } |
| | | |
| | | /** |
| | | * 判断请求是否为 AJAX |
| | | * |
| | | * @param request 当前请求 |
| | | */ |
| | | public static boolean isAjax(HttpServletRequest request) { |
| | | return "XMLHttpRequest".equals(request.getHeader("X-Requested-With")); |
| | | } |
| | | |
| | | /** |
| | | * 获取操作系统,浏览器及浏览器版本信息 |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | public static Map<String, String> getOsAndBrowserInfo(HttpServletRequest request) { |
| | | Map<String, String> map = new HashMap<>(2); |
| | | String browserDetails = request.getHeader("User-Agent"); |
| | | String userAgent = browserDetails; |
| | | String user = userAgent.toLowerCase(); |
| | | |
| | | String os = ""; |
| | | String browser = ""; |
| | | //=================OS Info======================= |
| | | if (userAgent.toLowerCase().contains("windows")) { |
| | | os = "Windows"; |
| | | } else if (userAgent.toLowerCase().contains("mac")) { |
| | | os = "Mac"; |
| | | } else if (userAgent.toLowerCase().contains("x11")) { |
| | | os = "Unix"; |
| | | } else if (userAgent.toLowerCase().contains("android")) { |
| | | os = "Android"; |
| | | } else if (userAgent.toLowerCase().contains("iphone")) { |
| | | os = "IPhone"; |
| | | } else { |
| | | os = "UnKnown, More-Info: " + userAgent; |
| | | } |
| | | //===============Browser=========================== |
| | | if (user.contains("edge")) { |
| | | browser = (userAgent.substring(userAgent.indexOf("Edge")).split(" ")[0]).replace("/", "-"); |
| | | } else if (user.contains("msie")) { |
| | | String substring = userAgent.substring(userAgent.indexOf("MSIE")).split(";")[0]; |
| | | browser = substring.split(" ")[0].replace("MSIE", "IE") + "-" + substring.split(" ")[1]; |
| | | } else if (user.contains("safari") && user.contains("version")) { |
| | | browser = (userAgent.substring(userAgent.indexOf("Safari")).split(" ")[0]).split("/")[0] |
| | | + "-" + (userAgent.substring(userAgent.indexOf("Version")).split(" ")[0]).split("/")[1]; |
| | | } else if (user.contains("opr") || user.contains("opera")) { |
| | | if (user.contains("opera")) { |
| | | browser = (userAgent.substring(userAgent.indexOf("Opera")).split(" ")[0]).split("/")[0] |
| | | + "-" + (userAgent.substring(userAgent.indexOf("Version")).split(" ")[0]).split("/")[1]; |
| | | } else if (user.contains("opr")) { |
| | | browser = ((userAgent.substring(userAgent.indexOf("OPR")).split(" ")[0]).replace("/", "-")) |
| | | .replace("OPR", "Opera"); |
| | | } |
| | | } else if (user.contains("chrome")) { |
| | | browser = (userAgent.substring(userAgent.indexOf("Chrome")).split(" ")[0]).replace("/", "-"); |
| | | } else if ((user.contains("mozilla/7.0")) || (user.contains("netscape6")) || |
| | | (user.contains("mozilla/4.7")) || (user.contains("mozilla/4.78")) || |
| | | (user.contains("mozilla/4.08")) || (user.contains("mozilla/3"))) { |
| | | browser = "Netscape-?"; |
| | | } else if (user.contains("firefox")) { |
| | | browser = (userAgent.substring(userAgent.indexOf("Firefox")).split(" ")[0]).replace("/", "-"); |
| | | } else if (user.contains("rv")) { |
| | | String IEVersion = (userAgent.substring(userAgent.indexOf("rv")).split(" ")[0]).replace("rv:", "-"); |
| | | browser = "IE" + IEVersion.substring(0, IEVersion.length() - 1); |
| | | } else { |
| | | browser = "UnKnown, More-Info: " + userAgent; |
| | | } |
| | | map.put("os", os); |
| | | map.put("browser", browser); |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 读取cookie |
| | | * |
| | | * @param name cookie name |
| | | * @return cookie value |
| | | */ |
| | | public String getCookieVal(String name) { |
| | | return getCookieVal(request(), name); |
| | | } |
| | | |
| | | /** |
| | | * 读取cookie |
| | | * |
| | | * @param request HttpServletRequest |
| | | * @param name cookie name |
| | | * @return cookie value |
| | | */ |
| | | public String getCookieVal(HttpServletRequest request, String name) { |
| | | Cookie cookie = getCookie(request, name); |
| | | return cookie != null ? cookie.getValue() : null; |
| | | } |
| | | |
| | | /** |
| | | * 清除 某个指定的cookie |
| | | * |
| | | * @param response HttpServletResponse |
| | | * @param key cookie key |
| | | */ |
| | | public void removeCookie(HttpServletResponse response, String key) { |
| | | setCookie(response, key, null, 0); |
| | | } |
| | | |
| | | /** |
| | | * 设置cookie |
| | | * |
| | | * @param response HttpServletResponse |
| | | * @param name cookie name |
| | | * @param value cookie value |
| | | * @param maxAgeInSeconds maxage |
| | | */ |
| | | public void setCookie(HttpServletResponse response, String name, String value, int maxAgeInSeconds) { |
| | | Cookie cookie = new Cookie(name, value); |
| | | cookie.setPath("/"); |
| | | cookie.setMaxAge(maxAgeInSeconds); |
| | | //cookie.setHttpOnly(true); |
| | | response.addCookie(cookie); |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TAppUser; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户基础信息 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-14 |
| | | */ |
| | | @Mapper |
| | | public interface TAppUserMapper extends BaseMapper<TAppUser> { |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TCoupon; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 优惠券 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-14 |
| | | */ |
| | | @Mapper |
| | | public interface TCouponMapper extends BaseMapper<TCoupon> { |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-15 |
| | | */ |
| | | public interface TOrderMapper extends BaseMapper<TOrder> { |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.TAppUserMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TAppUser"> |
| | | <id column="id" property="id" /> |
| | | <result column="nickname" property="nickname" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="sex" property="sex" /> |
| | | <result column="avatar" property="avatar" /> |
| | | <result column="openid" property="openid" /> |
| | | <result column="unionid" property="unionid" /> |
| | | <result column="emergencyContact" property="emergencyContact" /> |
| | | <result column="emergencyPhone" property="emergencyPhone" /> |
| | | <result column="accountBalance" property="accountBalance" /> |
| | | <result column="userTagId" property="userTagId" /> |
| | | <result column="status" property="status" /> |
| | | <result column="createTime" property="createTime" /> |
| | | <result column="is_exception" property="isException" /> |
| | | <result column="remark" property="remark" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, nickname, phone, sex, avatar, openid, unionid, emergencyContact, emergencyPhone, accountBalance, userTagId, status, createTime,is_exception,remark |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.TCouponMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TCoupon"> |
| | | <id column="id" property="id" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="createtime" property="createtime" /> |
| | | <result column="coupon_name" property="couponName" /> |
| | | <result column="coupon_type" property="couponType" /> |
| | | <result column="coupon_code" property="couponCode" /> |
| | | <result column="coupon_status" property="couponStatus" /> |
| | | <result column="coupon_service_type" property="couponServiceType" /> |
| | | <result column="coupon_conditional_amount" property="couponConditionalAmount" /> |
| | | <result column="coupon_preferential_amount" property="couponPreferentialAmount" /> |
| | | <result column="coupon_validity" property="couponValidity" /> |
| | | <result column="coupon_send_quantity" property="couponSendQuantity" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,user_id, createtime, coupon_name,coupon_type,coupon_code,coupon_status,coupon_service_type,coupon_conditional_amount, |
| | | coupon_preferential_amount,coupon_validity,coupon_send_quantity |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.stylefeng.guns.modular.system.dao.TOrderMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.modular.system.model.TOrder"> |
| | | <id column="id" property="id" /> |
| | | <result column="code" property="code" /> |
| | | <result column="userId" property="userId" /> |
| | | <result column="driverId" property="driverId" /> |
| | | <result column="source" property="source" /> |
| | | <result column="agentId" property="agentId" /> |
| | | <result column="branchOfficeId" property="branchOfficeId" /> |
| | | <result column="startTime" property="startTime" /> |
| | | <result column="startAddress" property="startAddress" /> |
| | | <result column="startLat" property="startLat" /> |
| | | <result column="startLng" property="startLng" /> |
| | | <result column="endAddress" property="endAddress" /> |
| | | <result column="endLat" property="endLat" /> |
| | | <result column="endLng" property="endLng" /> |
| | | <result column="boardingTime" property="boardingTime" /> |
| | | <result column="getoffTime" property="getoffTime" /> |
| | | <result column="estimatedPrice" property="estimatedPrice" /> |
| | | <result column="orderMoney" property="orderMoney" /> |
| | | <result column="payMoney" property="payMoney" /> |
| | | <result column="discountedPrice" property="discountedPrice" /> |
| | | <result column="couponId" property="couponId" /> |
| | | <result column="payType" property="payType" /> |
| | | <result column="payTime" property="payTime" /> |
| | | <result column="state" property="state" /> |
| | | <result column="status" property="status" /> |
| | | <result column="createTime" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, code, userId, driverId, source, agentId, branchOfficeId, startTime, startAddress, startLat, startLng, endAddress, endLat, endLng, boardingTime, getoffTime, estimatedPrice, orderMoney, payMoney, discountedPrice, couponId, payType, payTime, state, status, createTime |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | <result column="avatar" property="avatar" /> |
| | | <result column="account" property="account" /> |
| | | <result column="password" property="password" /> |
| | | <result column="passWordUpdate" property="passWordUpdate"/> |
| | | <result column="pass_word_update" property="passWordUpdate"/> |
| | | <result column="salt" property="salt" /> |
| | | <result column="name" property="name" /> |
| | | <result column="birthday" property="birthday" /> |
| | |
| | | <result column="status" property="status" /> |
| | | <result column="createtime" property="createtime" /> |
| | | <result column="version" property="version" /> |
| | | <result column="role_type" property="roleType" /> |
| | | <result column="object_id" property="objectId" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.enums; |
| | | |
| | | |
| | | |
| | | /** |
| | | * @Description 优惠券状态枚举 |
| | | * @Author xiaochen |
| | | * @Date 2023/02/15 9:42 |
| | | */ |
| | | public enum CouponStatusEnum { |
| | | |
| | | UNISSUED(1, "未发放"), |
| | | NOT_USED(2, "未使用"), |
| | | USED(3, "已使用"), |
| | | EXPIRED(4,"已过期"); |
| | | |
| | | private String desc; |
| | | |
| | | |
| | | private int code; |
| | | |
| | | |
| | | CouponStatusEnum(int code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public int getCode() { |
| | | return code; |
| | | } |
| | | |
| | | /** |
| | | * 通过code获取枚举 |
| | | * |
| | | * @param code |
| | | * @return |
| | | */ |
| | | public static CouponStatusEnum fromCode(Integer code) { |
| | | CouponStatusEnum[] resultTypes = CouponStatusEnum.values(); |
| | | for (CouponStatusEnum resultType : resultTypes) { |
| | | if (code.equals(resultType.getCode())) { |
| | | return resultType; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.exports; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | public class TAppUserExceptionExport implements Serializable { |
| | | |
| | | @ApiModelProperty(value = "用户ID") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "昵称") |
| | | private String nickname; |
| | | |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "状态") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "注册时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "剩余优惠券") |
| | | private Integer remainingCoupons; |
| | | |
| | | @ApiModelProperty(value = "优惠券总数") |
| | | private Integer couponsSum; |
| | | |
| | | @ApiModelProperty(value = "消费次数") |
| | | private Integer ConsumptionTimes = 0; |
| | | |
| | | @ApiModelProperty(value = "历史消费") |
| | | private BigDecimal HistoricalConsumption = new BigDecimal("0.00"); |
| | | |
| | | @ApiModelProperty(value = "最后一次消费时间") |
| | | private Date lastConsumptionTime; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getNickname() { |
| | | return nickname; |
| | | } |
| | | |
| | | public void setNickname(String nickname) { |
| | | this.nickname = nickname; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Integer getRemainingCoupons() { |
| | | return remainingCoupons; |
| | | } |
| | | |
| | | public void setRemainingCoupons(Integer remainingCoupons) { |
| | | this.remainingCoupons = remainingCoupons; |
| | | } |
| | | |
| | | public Integer getCouponsSum() { |
| | | return couponsSum; |
| | | } |
| | | |
| | | public void setCouponsSum(Integer couponsSum) { |
| | | this.couponsSum = couponsSum; |
| | | } |
| | | |
| | | public Integer getConsumptionTimes() { |
| | | return ConsumptionTimes; |
| | | } |
| | | |
| | | public void setConsumptionTimes(Integer consumptionTimes) { |
| | | ConsumptionTimes = consumptionTimes; |
| | | } |
| | | |
| | | public BigDecimal getHistoricalConsumption() { |
| | | return HistoricalConsumption; |
| | | } |
| | | |
| | | public void setHistoricalConsumption(BigDecimal historicalConsumption) { |
| | | HistoricalConsumption = historicalConsumption; |
| | | } |
| | | |
| | | public Date getLastConsumptionTime() { |
| | | return lastConsumptionTime; |
| | | } |
| | | |
| | | public void setLastConsumptionTime(Date lastConsumptionTime) { |
| | | this.lastConsumptionTime = lastConsumptionTime; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户基础信息 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-14 |
| | | */ |
| | | @TableName("t_app_user") |
| | | public class TAppUser extends Model<TAppUser> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 用户昵称 |
| | | */ |
| | | private String nickname; |
| | | /** |
| | | * 手机号 |
| | | */ |
| | | private String phone; |
| | | /** |
| | | * 性别(1=男,2=女) |
| | | */ |
| | | private Integer sex; |
| | | /** |
| | | * 头像 |
| | | */ |
| | | private String avatar; |
| | | /** |
| | | * 微信openid |
| | | */ |
| | | private String openid; |
| | | /** |
| | | * 微信unionid |
| | | */ |
| | | private String unionid; |
| | | /** |
| | | * 紧急联系人 |
| | | */ |
| | | private String emergencyContact; |
| | | /** |
| | | * 紧急联系电话 |
| | | */ |
| | | private String emergencyPhone; |
| | | /** |
| | | * 账户余额 |
| | | */ |
| | | private Double accountBalance; |
| | | /** |
| | | * 用户标签id |
| | | */ |
| | | private Integer userTagId; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | /** |
| | | * 是否异常 1正常 0异常 |
| | | */ |
| | | @TableField(value = "is_exception") |
| | | private Integer isException; |
| | | |
| | | /** |
| | | * 启用冻结理由 |
| | | */ |
| | | @TableField(value = "remark") |
| | | private String remark; |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "注册开始时间") |
| | | private Date startTime; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "注册结束时间") |
| | | private Date endTime; |
| | | |
| | | public Integer getIsException() { |
| | | return isException; |
| | | } |
| | | |
| | | public void setIsException(Integer isException) { |
| | | this.isException = isException; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public Date getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public Date getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getNickname() { |
| | | return nickname; |
| | | } |
| | | |
| | | public void setNickname(String nickname) { |
| | | this.nickname = nickname; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | public Integer getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(Integer sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public String getAvatar() { |
| | | return avatar; |
| | | } |
| | | |
| | | public void setAvatar(String avatar) { |
| | | this.avatar = avatar; |
| | | } |
| | | |
| | | public String getOpenid() { |
| | | return openid; |
| | | } |
| | | |
| | | public void setOpenid(String openid) { |
| | | this.openid = openid; |
| | | } |
| | | |
| | | public String getUnionid() { |
| | | return unionid; |
| | | } |
| | | |
| | | public void setUnionid(String unionid) { |
| | | this.unionid = unionid; |
| | | } |
| | | |
| | | public String getEmergencyContact() { |
| | | return emergencyContact; |
| | | } |
| | | |
| | | public void setEmergencyContact(String emergencyContact) { |
| | | this.emergencyContact = emergencyContact; |
| | | } |
| | | |
| | | public String getEmergencyPhone() { |
| | | return emergencyPhone; |
| | | } |
| | | |
| | | public void setEmergencyPhone(String emergencyPhone) { |
| | | this.emergencyPhone = emergencyPhone; |
| | | } |
| | | |
| | | public Double getAccountBalance() { |
| | | return accountBalance; |
| | | } |
| | | |
| | | public void setAccountBalance(Double accountBalance) { |
| | | this.accountBalance = accountBalance; |
| | | } |
| | | |
| | | public Integer getUserTagId() { |
| | | return userTagId; |
| | | } |
| | | |
| | | public void setUserTagId(Integer userTagId) { |
| | | this.userTagId = userTagId; |
| | | } |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TAppUser{" + |
| | | "id=" + id + |
| | | ", nickname=" + nickname + |
| | | ", phone=" + phone + |
| | | ", sex=" + sex + |
| | | ", avatar=" + avatar + |
| | | ", openid=" + openid + |
| | | ", unionid=" + unionid + |
| | | ", emergencyContact=" + emergencyContact + |
| | | ", emergencyPhone=" + emergencyPhone + |
| | | ", accountBalance=" + accountBalance + |
| | | ", userTagId=" + userTagId + |
| | | ", status=" + status + |
| | | ", createTime=" + createTime + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 优惠券 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-14 |
| | | */ |
| | | @TableName("t_coupon") |
| | | public class TCoupon extends Model<TCoupon> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private Date createtime; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | @TableField("user_id") |
| | | private Integer userId; |
| | | |
| | | @ApiModelProperty(value = "优惠券名称") |
| | | @TableField("coupon_name") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value = "优惠券类型 1活动券 2新人券") |
| | | @TableField("coupon_type") |
| | | private Integer couponType; |
| | | |
| | | @ApiModelProperty(value = "优惠券码") |
| | | @TableField("coupon_code") |
| | | private String couponCode; |
| | | |
| | | @ApiModelProperty(value = "优惠券状态 1未发放 2未使用 3已使用 4已过期") |
| | | @TableField("coupon_status") |
| | | private Integer couponStatus; |
| | | |
| | | @ApiModelProperty(value = "服务类型 1通用券") |
| | | @TableField("coupon_service_type") |
| | | private Integer couponServiceType; |
| | | |
| | | @ApiModelProperty(value = "条件金额") |
| | | @TableField("coupon_conditional_amount") |
| | | private BigDecimal couponConditionalAmount; |
| | | |
| | | @ApiModelProperty(value = "优惠金额") |
| | | @TableField("coupon_preferential_amount") |
| | | private BigDecimal couponPreferentialAmount; |
| | | |
| | | @ApiModelProperty(value = "有效期") |
| | | @TableField("coupon_validity") |
| | | private Integer couponValidity; |
| | | |
| | | @ApiModelProperty(value = "赠送数量 新人券") |
| | | @TableField("coupon_send_quantity") |
| | | private Integer couponSendQuantity; |
| | | |
| | | public Integer getCouponValidity() { |
| | | return couponValidity; |
| | | } |
| | | |
| | | public void setCouponValidity(Integer couponValidity) { |
| | | this.couponValidity = couponValidity; |
| | | } |
| | | |
| | | public Integer getCouponSendQuantity() { |
| | | return couponSendQuantity; |
| | | } |
| | | |
| | | public void setCouponSendQuantity(Integer couponSendQuantity) { |
| | | this.couponSendQuantity = couponSendQuantity; |
| | | } |
| | | |
| | | public Integer getCouponServiceType() { |
| | | return couponServiceType; |
| | | } |
| | | |
| | | public void setCouponServiceType(Integer couponServiceType) { |
| | | this.couponServiceType = couponServiceType; |
| | | } |
| | | |
| | | public BigDecimal getCouponConditionalAmount() { |
| | | return couponConditionalAmount; |
| | | } |
| | | |
| | | public void setCouponConditionalAmount(BigDecimal couponConditionalAmount) { |
| | | this.couponConditionalAmount = couponConditionalAmount; |
| | | } |
| | | |
| | | public BigDecimal getCouponPreferentialAmount() { |
| | | return couponPreferentialAmount; |
| | | } |
| | | |
| | | public void setCouponPreferentialAmount(BigDecimal couponPreferentialAmount) { |
| | | this.couponPreferentialAmount = couponPreferentialAmount; |
| | | } |
| | | |
| | | public Integer getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(Integer userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public Integer getCouponType() { |
| | | return couponType; |
| | | } |
| | | |
| | | public void setCouponType(Integer couponType) { |
| | | this.couponType = couponType; |
| | | } |
| | | |
| | | public String getCouponCode() { |
| | | return couponCode; |
| | | } |
| | | |
| | | public void setCouponCode(String couponCode) { |
| | | this.couponCode = couponCode; |
| | | } |
| | | |
| | | public Integer getCouponStatus() { |
| | | return couponStatus; |
| | | } |
| | | |
| | | public void setCouponStatus(Integer couponStatus) { |
| | | this.couponStatus = couponStatus; |
| | | } |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Date getCreatetime() { |
| | | return createtime; |
| | | } |
| | | |
| | | public void setCreatetime(Date createtime) { |
| | | this.createtime = createtime; |
| | | } |
| | | |
| | | public String getCouponName() { |
| | | return couponName; |
| | | } |
| | | |
| | | public void setCouponName(String couponName) { |
| | | this.couponName = couponName; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TCoupon{" + |
| | | "id=" + id + |
| | | ", createtime=" + createtime + |
| | | ", couponName=" + couponName + |
| | | "}"; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-15 |
| | | */ |
| | | @TableName("t_order") |
| | | public class TOrder extends Model<TOrder> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 编号 |
| | | */ |
| | | private String code; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | private Integer userId; |
| | | /** |
| | | * 司机id |
| | | */ |
| | | private Integer driverId; |
| | | /** |
| | | * 订单来源(1=小程序) |
| | | */ |
| | | private Integer source; |
| | | /** |
| | | * 代理商id |
| | | */ |
| | | private Integer agentId; |
| | | /** |
| | | * 分公司id |
| | | */ |
| | | private Integer branchOfficeId; |
| | | /** |
| | | * 开始服务时间 |
| | | */ |
| | | private Date startTime; |
| | | /** |
| | | * 起点地址 |
| | | */ |
| | | private String startAddress; |
| | | /** |
| | | * 起点纬度 |
| | | */ |
| | | private String startLat; |
| | | /** |
| | | * 起点经度 |
| | | */ |
| | | private String startLng; |
| | | /** |
| | | * 终点地址 |
| | | */ |
| | | private String endAddress; |
| | | /** |
| | | * 终点纬度 |
| | | */ |
| | | private String endLat; |
| | | /** |
| | | * 终点经度 |
| | | */ |
| | | private String endLng; |
| | | /** |
| | | * 上车时间 |
| | | */ |
| | | private Date boardingTime; |
| | | /** |
| | | * 下车时间 |
| | | */ |
| | | private Date getoffTime; |
| | | /** |
| | | * 预估价 |
| | | */ |
| | | private BigDecimal estimatedPrice; |
| | | /** |
| | | * 订单金额 |
| | | */ |
| | | private BigDecimal orderMoney; |
| | | /** |
| | | * 支付金额 |
| | | */ |
| | | private BigDecimal payMoney; |
| | | /** |
| | | * 优惠金额 |
| | | */ |
| | | private BigDecimal discountedPrice; |
| | | /** |
| | | * 优惠券id |
| | | */ |
| | | private Integer couponId; |
| | | /** |
| | | * 支付类型(1=线上) |
| | | */ |
| | | private Integer payType; |
| | | /** |
| | | * 支付时间 |
| | | */ |
| | | private Date payTime; |
| | | /** |
| | | * 订单状态(1=待接单,2=已接单,3=) |
| | | */ |
| | | private Integer state; |
| | | /** |
| | | * 状态(1=正常,2=冻结,3=删除) |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | private Date createTime; |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | |
| | | public Integer getUserId() { |
| | | return userId; |
| | | } |
| | | |
| | | public void setUserId(Integer userId) { |
| | | this.userId = userId; |
| | | } |
| | | |
| | | public Integer getDriverId() { |
| | | return driverId; |
| | | } |
| | | |
| | | public void setDriverId(Integer driverId) { |
| | | this.driverId = driverId; |
| | | } |
| | | |
| | | public Integer getSource() { |
| | | return source; |
| | | } |
| | | |
| | | public void setSource(Integer source) { |
| | | this.source = source; |
| | | } |
| | | |
| | | public Integer getAgentId() { |
| | | return agentId; |
| | | } |
| | | |
| | | public void setAgentId(Integer agentId) { |
| | | this.agentId = agentId; |
| | | } |
| | | |
| | | public Integer getBranchOfficeId() { |
| | | return branchOfficeId; |
| | | } |
| | | |
| | | public void setBranchOfficeId(Integer branchOfficeId) { |
| | | this.branchOfficeId = branchOfficeId; |
| | | } |
| | | |
| | | public Date getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public String getStartAddress() { |
| | | return startAddress; |
| | | } |
| | | |
| | | public void setStartAddress(String startAddress) { |
| | | this.startAddress = startAddress; |
| | | } |
| | | |
| | | public String getStartLat() { |
| | | return startLat; |
| | | } |
| | | |
| | | public void setStartLat(String startLat) { |
| | | this.startLat = startLat; |
| | | } |
| | | |
| | | public String getStartLng() { |
| | | return startLng; |
| | | } |
| | | |
| | | public void setStartLng(String startLng) { |
| | | this.startLng = startLng; |
| | | } |
| | | |
| | | public String getEndAddress() { |
| | | return endAddress; |
| | | } |
| | | |
| | | public void setEndAddress(String endAddress) { |
| | | this.endAddress = endAddress; |
| | | } |
| | | |
| | | public String getEndLat() { |
| | | return endLat; |
| | | } |
| | | |
| | | public void setEndLat(String endLat) { |
| | | this.endLat = endLat; |
| | | } |
| | | |
| | | public String getEndLng() { |
| | | return endLng; |
| | | } |
| | | |
| | | public void setEndLng(String endLng) { |
| | | this.endLng = endLng; |
| | | } |
| | | |
| | | public Date getBoardingTime() { |
| | | return boardingTime; |
| | | } |
| | | |
| | | public void setBoardingTime(Date boardingTime) { |
| | | this.boardingTime = boardingTime; |
| | | } |
| | | |
| | | public Date getGetoffTime() { |
| | | return getoffTime; |
| | | } |
| | | |
| | | public void setGetoffTime(Date getoffTime) { |
| | | this.getoffTime = getoffTime; |
| | | } |
| | | |
| | | public BigDecimal getEstimatedPrice() { |
| | | return estimatedPrice; |
| | | } |
| | | |
| | | public void setEstimatedPrice(BigDecimal estimatedPrice) { |
| | | this.estimatedPrice = estimatedPrice; |
| | | } |
| | | |
| | | public BigDecimal getOrderMoney() { |
| | | return orderMoney; |
| | | } |
| | | |
| | | public void setOrderMoney(BigDecimal orderMoney) { |
| | | this.orderMoney = orderMoney; |
| | | } |
| | | |
| | | public BigDecimal getPayMoney() { |
| | | return payMoney; |
| | | } |
| | | |
| | | public void setPayMoney(BigDecimal payMoney) { |
| | | this.payMoney = payMoney; |
| | | } |
| | | |
| | | public BigDecimal getDiscountedPrice() { |
| | | return discountedPrice; |
| | | } |
| | | |
| | | public void setDiscountedPrice(BigDecimal discountedPrice) { |
| | | this.discountedPrice = discountedPrice; |
| | | } |
| | | |
| | | public Integer getCouponId() { |
| | | return couponId; |
| | | } |
| | | |
| | | public void setCouponId(Integer couponId) { |
| | | this.couponId = couponId; |
| | | } |
| | | |
| | | public Integer getPayType() { |
| | | return payType; |
| | | } |
| | | |
| | | public void setPayType(Integer payType) { |
| | | this.payType = payType; |
| | | } |
| | | |
| | | public Date getPayTime() { |
| | | return payTime; |
| | | } |
| | | |
| | | public void setPayTime(Date payTime) { |
| | | this.payTime = payTime; |
| | | } |
| | | |
| | | public Integer getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(Integer state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TOrder{" + |
| | | "id=" + id + |
| | | ", code=" + code + |
| | | ", userId=" + userId + |
| | | ", driverId=" + driverId + |
| | | ", source=" + source + |
| | | ", agentId=" + agentId + |
| | | ", branchOfficeId=" + branchOfficeId + |
| | | ", startTime=" + startTime + |
| | | ", startAddress=" + startAddress + |
| | | ", startLat=" + startLat + |
| | | ", startLng=" + startLng + |
| | | ", endAddress=" + endAddress + |
| | | ", endLat=" + endLat + |
| | | ", endLng=" + endLng + |
| | | ", boardingTime=" + boardingTime + |
| | | ", getoffTime=" + getoffTime + |
| | | ", estimatedPrice=" + estimatedPrice + |
| | | ", orderMoney=" + orderMoney + |
| | | ", payMoney=" + payMoney + |
| | | ", discountedPrice=" + discountedPrice + |
| | | ", couponId=" + couponId + |
| | | ", payType=" + payType + |
| | | ", payTime=" + payTime + |
| | | ", state=" + state + |
| | | ", status=" + status + |
| | | ", createTime=" + createTime + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | |
| | | /** |
| | | * 密码修改时间 |
| | | */ |
| | | @TableField(value = "pass_word_update") |
| | | private Date passWordUpdate; |
| | | /** |
| | | * md5密码盐 |
| | |
| | | /** |
| | | * 角色类型 1=平台 2=分公司 3=加盟商 |
| | | */ |
| | | @TableField(value = "role_type") |
| | | private Integer roleType; |
| | | /** |
| | | * 对象ID |
| | | */ |
| | | @TableField(value = "object_id") |
| | | private Integer objectId; |
| | | |
| | | public Integer getRoleType() { |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.modular.system.model.TAppUser; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | import org.springframework.ui.Model; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户基础信息 服务类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-14 |
| | | */ |
| | | public interface ITAppUserService extends IService<TAppUser> { |
| | | |
| | | /** |
| | | * 详情页面跳转 |
| | | * @param tAppUserId |
| | | * @param model |
| | | */ |
| | | void detail(Integer tAppUserId, Model model); |
| | | |
| | | /** |
| | | * 封装用户列表查询wrapper |
| | | * @param createTime |
| | | * @param nickname |
| | | * @param phone |
| | | * @param id |
| | | * @param status |
| | | * @return |
| | | */ |
| | | EntityWrapper<TAppUser> getUserListWrapper(String createTime, String nickname, String phone, Integer id, Integer status); |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TCoupon; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 优惠券 服务类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-14 |
| | | */ |
| | | public interface ITCouponService extends IService<TCoupon> { |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单 服务类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-15 |
| | | */ |
| | | public interface ITOrderService extends IService<TOrder> { |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.modular.system.dao.TCouponMapper; |
| | | import com.stylefeng.guns.modular.system.enums.CouponStatusEnum; |
| | | import com.stylefeng.guns.modular.system.model.TAppUser; |
| | | import com.stylefeng.guns.modular.system.dao.TAppUserMapper; |
| | | import com.stylefeng.guns.modular.system.model.TCoupon; |
| | | import com.stylefeng.guns.modular.system.service.ITAppUserService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 用户基础信息 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-14 |
| | | */ |
| | | @Service |
| | | public class TAppUserServiceImpl extends ServiceImpl<TAppUserMapper, TAppUser> implements ITAppUserService { |
| | | |
| | | @Autowired |
| | | private TAppUserMapper tAppUserMapper; |
| | | @Autowired |
| | | private TCouponMapper tCouponMapper; |
| | | |
| | | @Override |
| | | public void detail(Integer tAppUserId, Model model) { |
| | | // 用户资料 |
| | | TAppUser tAppUser = tAppUserMapper.selectById(tAppUserId); |
| | | model.addAttribute("avatar",tAppUser.getAvatar()); |
| | | model.addAttribute("status",tAppUser.getStatus()); |
| | | model.addAttribute("id",tAppUser.getId()); |
| | | model.addAttribute("nickname",tAppUser.getNickname()); |
| | | model.addAttribute("remark",tAppUser.getRemark()); |
| | | model.addAttribute("createTime",tAppUser.getCreateTime()); |
| | | // 消费信息:优惠券数据 |
| | | List<TCoupon> tCoupons = tCouponMapper.selectList(new EntityWrapper<TCoupon>().eq("user_id", tAppUserId)); |
| | | List<TCoupon> notUsedList = tCoupons.stream().filter(coupon -> coupon.getCouponStatus().equals(CouponStatusEnum.NOT_USED.getCode())).collect(Collectors.toList()); |
| | | List<TCoupon> usedList = tCoupons.stream().filter(coupon -> coupon.getCouponStatus().equals(CouponStatusEnum.USED.getCode())).collect(Collectors.toList()); |
| | | List<TCoupon> expiredList = tCoupons.stream().filter(coupon -> coupon.getCouponStatus().equals(CouponStatusEnum.EXPIRED.getCode())).collect(Collectors.toList()); |
| | | model.addAttribute("notUsedCount",notUsedList.size()); |
| | | model.addAttribute("usedCount",usedList.size()); |
| | | model.addAttribute("expiredCount",expiredList.size()); |
| | | } |
| | | |
| | | @Override |
| | | public EntityWrapper<TAppUser> getUserListWrapper(String createTime, String nickname, String phone, Integer id, Integer status) { |
| | | EntityWrapper<TAppUser> wrapper = new EntityWrapper<>(); |
| | | // 昵称 |
| | | if(StringUtils.hasLength(nickname)){ |
| | | wrapper.like("nickname",nickname); |
| | | } |
| | | // 手机号 |
| | | if(StringUtils.hasLength(phone)){ |
| | | wrapper.like("phone",phone); |
| | | } |
| | | // id |
| | | if(Objects.nonNull(id)){ |
| | | wrapper.eq("id",id); |
| | | } |
| | | // 开始,结束时间 |
| | | if(StringUtils.hasLength(createTime)){ |
| | | String[] split = createTime.split(" - "); |
| | | Date startTime = DateUtil.getDate_str4(split[0]); |
| | | Date endTime = DateUtil.getDate_str4(split[1]); |
| | | wrapper.between("createtime",startTime,endTime); |
| | | } |
| | | // if(Objects.nonNull(startTime) && Objects.nonNull(endTime)){ |
| | | // wrapper.between("createtime",startTime,endTime); |
| | | // } |
| | | // 状态 |
| | | if(Objects.nonNull(status)){ |
| | | wrapper.eq("status",status); |
| | | } |
| | | return wrapper; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TCoupon; |
| | | import com.stylefeng.guns.modular.system.dao.TCouponMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITCouponService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 优惠券 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-14 |
| | | */ |
| | | @Service |
| | | public class TCouponServiceImpl extends ServiceImpl<TCouponMapper, TCoupon> implements ITCouponService { |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.stylefeng.guns.modular.system.model.TOrder; |
| | | import com.stylefeng.guns.modular.system.dao.TOrderMapper; |
| | | import com.stylefeng.guns.modular.system.service.ITOrderService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author stylefeng |
| | | * @since 2023-02-15 |
| | | */ |
| | | @Service |
| | | public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> implements ITOrderService { |
| | | |
| | | } |
| | |
| | | |
| | | guns: |
| | | swagger-open: true #是否开启swagger (true/false) |
| | | kaptcha-open: false #是否开启登录时验证码 (true/false) |
| | | kaptcha-open: true #是否开启登录时验证码 (true/false) |
| | | spring-session-open: false #是否开启spring session,如果是多机环境需要开启(true/false) |
| | | session-invalidate-time: 1800 #session失效时间(只在单机环境下生效,多机环境在SpringSessionConfig类中配置) 单位:秒 |
| | | session-validation-interval: 900 #多久检测一次失效的session(只在单机环境下生效) 单位:秒 |
| | |
| | | spring: |
| | | profiles: |
| | | active: local |
| | | datasource: |
| | | url: jdbc:mysql://192.168.0.80:3306/super_save_driving?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 123456 |
| | | db-name: super_save_driving #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | mvc: |
| | | static-path-pattern: /static/** |
| | | view: |
| | |
| | | url: jdbc:mysql://192.168.0.80:3306/super_save_driving?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8 |
| | | username: root |
| | | password: 123456 |
| | | db-name: oktravel #用来搜集数据库的所有表 |
| | | db-name: super_save_driving #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | | |
| | |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | |
| | | |
| | | <title>OK出行 - 404 页面</title> |
| | | <title>超省新代驾 - 404 页面</title> |
| | | <link rel="shortcut icon" href="${ctxPath}/static/favicon1.ico"> <link href="${ctxPath}/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> |
| | | <link href="${ctxPath}/static/css/font-awesome.css?v=4.4.0" rel="stylesheet"> |
| | | <link href="${ctxPath}/static/css/style.css?v=4.1.0" rel="stylesheet"> |
| | |
| | | <div class="navbar-header"><a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a> |
| | | <form role="search" class="navbar-form-custom" method="post" action="search_results.html"> |
| | | <div class="form-group"> |
| | | <input type="text" placeholder="OK出行后台管理系统 …" class="form-control" name="top-search" id="top-search" value="OK出行后台管理系统" disabled> |
| | | <input type="text" placeholder="超省代驾后台管理系统 …" class="form-control" name="top-search" id="top-search" value="超省新代驾后台管理系统" disabled> |
| | | </div> |
| | | </form> |
| | | <h3 style="float: right;line-height: 50px;color: red;">${passwordHint}</h3> |
| | |
| | | <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="${ctxPath}/blackboard?type=${type}" frameborder="0" data-id="${ctxPath}/blackboard" seamless></iframe> |
| | | </div> |
| | | <div class="footer"> |
| | | <div class="pull-right">© 2019-2021 <a href="#" onclick="return false" target="_blank">OK出行</a> |
| | | <div class="pull-right">© 2019-2021 <a href="#" onclick="return false" target="_blank">超省新代驾</a> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | <meta name="renderer" content="webkit"> |
| | | <title>OK出行 - 主页</title> |
| | | <title>超省新代驾 - 主页</title> |
| | | <link rel="shortcut icon" href="${ctxPath}/static/favicon1.ico"> |
| | | <link href="${ctxPath}/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> |
| | | <link href="${ctxPath}/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet"> |
| | |
| | | <meta charset="utf-8"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| | | |
| | | <title>OK出行 - 登录</title> |
| | | <title>超省新代驾 - 登录</title> |
| | | |
| | | <link rel="shortcut icon" href="${ctxPath}/static/favicon1.ico"> |
| | | <link href="${ctxPath}/static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet"> |
| | |
| | | <div style="display: flex;align-items: center;justify-content: center;height: 100%"> |
| | | |
| | | |
| | | <img src="${ctxPath}/static/img/index4.png" style="width: 300px;height: 400px;z-index: 1000"> |
| | | <!--<img src="${ctxPath}/static/img/index4.png" style="width: 300px;height: 400px;z-index: 1000">--> |
| | | <div style="position: relative;left: -20px; max-width: 300px;min-height: 300px;background: white;border-radius: 8px;box-sizing: border-box;padding: 0 30px 0 50px;display: flex;align-items: center;justify-content: center;"> |
| | | <div style="max-height: 100%"> |
| | | <h3 style="color: black;"><img src="${ctxPath}/static/img/logo.png" width="30px" height="30px"/> OK出行管理后台</h3> |
| | | <h3 style="color: black;"><img src="${ctxPath}/static/img/logo.png" width="30px" height="30px"/> 超省新代驾管理后台</h3> |
| | | <br/> |
| | | <h4 style="color: red;">${tips!}</h4> |
| | | <form class="m-t" role="form" action="${ctxPath}/login" method="post"> |
| | | <div class="item"> |
| | | <img src="${ctxPath}/static/img/account.png" /> |
| | | <input hidden id="number" value="${number}"> |
| | | <input class="itemInput" type="text" name="username" id="username" placeholder="请输入您的账号" required="" value=""> |
| | | </div> |
| | | <div class="item"> |
| | | <img src="${ctxPath}/static/img/password.png" /> |
| | | <input class="itemInput" type="password" name="password" id="password" placeholder="请输入您的密码" required="" value=""> |
| | | </div> |
| | | <div id="verify" style="display: none"> |
| | | @if(kaptcha.getKaptchaOnOff() == true){ |
| | | <div class="form-group" style="float: left;"> |
| | | <div class="col-sm-8" style="padding-left: 0px; padding-right: 0px;"> |
| | | <input class="form-control" type="text" name="kaptcha" placeholder="验证码" required=""> |
| | | <input class="form-control" type="text" name="kaptcha" id="verifyNumber" placeholder="验证码" > |
| | | </div> |
| | | <div class="col-sm-4" style="padding-left: 0px; padding-right: 0px;"> |
| | | <img src="${ctxPath}/kaptcha" id="kaptcha" width="100%" height="100%"/> |
| | | </div> |
| | | </div> |
| | | @} |
| | | </div> |
| | | <div class="form-group" style="float: left;"> |
| | | <div class="checkbox" style="text-align: left"> |
| | | <!--<label> |
| | |
| | | <script src="${ctxPath}/static/crypto-js/crypto-js.js"></script> |
| | | <script> |
| | | $(function () { |
| | | console.log($("#number").val()) |
| | | if($("#number").val()==5){ |
| | | document.getElementById("verifyNumber").setAttribute("required","") |
| | | $("#verify").show() |
| | | }else { |
| | | $("#number").val(0) |
| | | $("#verify").hide() |
| | | } |
| | | |
| | | $("#kaptcha").on('click', function () { |
| | | $("#kaptcha").attr('src', '${ctxPath}/kaptcha?' + Math.floor(Math.random() * 100)).fadeIn(); |
| | | }); |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="createTime" name="注册时间"/> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="id" name="用户ID" /> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="nickName" name="昵称" /> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="phone" name="手机号" /> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <select class="input-group" id="status" style="width: 80px;height: 33px" name="status"> |
| | | <option value="">状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="2">冻结</option> |
| | | <option value="3">已删除</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TAppUser.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TAppUser.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <button type="button" class="btn btn-primary " onclick="TAppUser.export()" id="export"> |
| | | <i class="fa "></i> 导出 |
| | | </button> |
| | | <#button name="异常" icon="" clickFun="TAppUserException.tAppUserException()"/> |
| | | <button type="button" class="btn btn-primary " onclick="TAppUser.searchCoupon()" id=""> |
| | | <i class="fa "></i> 赠送优惠劵 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <!--<div class="hidden-xs" id="TAppUserTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tAppUser/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TAppUser.openAddTAppUser()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tAppUser/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TAppUser.openTAppUserDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tAppUser/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TAppUser.delete()" space="true"/> |
| | | @} |
| | | </div>--> |
| | | <#table id="TAppUserTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tCoupon.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUserException.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>详情</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">用户资料</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-1 control-label form-group" style="margin-left: 10px" > |
| | | <img src="https://lmg.jj20.com/up/allimg/1114/040221103339/210402103339-7-1200.jpg" /> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >昵称:</label> |
| | | <label>${nickname}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">ID:</label> |
| | | <label>${id}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label">注册时间:</label> |
| | | <label>${createTime}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" style="margin-left: 150px"> |
| | | <label class="control-label">客户渠道:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" style="margin-left: 150px"> |
| | | <label class="control-label" >下单次数:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" style="margin-left: 150px" > |
| | | <label class="control-label" >取消次数:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">消费信息</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" > |
| | | <label class="col-sm-3 control-label" style="margin-left: -50px;font-weight: bolder;color: #0C0C0C;left: 100px">最近消费:</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-4 control-label form-group" > |
| | | <label class="col-sm-2 control-label" style="margin-left: -50px;font-weight: bolder;color: #0C0C0C;left: 100px">优惠劵:</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" style="margin-left: 70px"> |
| | | <label class="control-label">最近消费时间:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">未使用:</label> |
| | | <label>${notUsedCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label">已使用:</label> |
| | | <label>${usedCount}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" style="margin-left: 70px" > |
| | | <label class="control-label" >最近消费金额:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-4 control-label form-group" > |
| | | <label class="control-label">已过期:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" > |
| | | <label class="col-sm-3 control-label" style="margin-left: -50px;font-weight: bolder;color: #0C0C0C;left: 100px">累计消费/售后:</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-4 control-label form-group" > |
| | | <label class="col-sm-2 control-label" style="margin-left: -50px;font-weight: bolder;color: #0C0C0C;left: 100px">金额:</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" style="margin-left: 70px" > |
| | | <label class="control-label">总消费金额:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">剩余:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" style="margin-left: 70px" > |
| | | <label class="control-label">总消费次数:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <input hidden id="status" value="${status}"> |
| | | <div> |
| | | @if(status==1){ |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">启用理由</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | <div style="margin-left: 70px" > |
| | | <textarea id="stopRemark" style="width: 681px; height: 249px;" readonly>${remark}</textarea> |
| | | </div> |
| | | @} |
| | | @if(status==2){ |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">冻结理由</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | <div style="margin-left: 70px" > |
| | | <textarea id="startRemark" style="width: 681px; height: 249px;" readonly>${remark}</textarea> |
| | | </div> |
| | | @} |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">交易明细</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | <!--订单表分页--> |
| | | <#table id="TAppUserDetailOrderTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tCoupon.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUserException.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tOrder.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUserDetailOrder.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>详情</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">用户资料</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-1 control-label form-group" style="margin-left: 10px" > |
| | | <img src="https://lmg.jj20.com/up/allimg/1114/040221103339/210402103339-7-1200.jpg" /> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >昵称:</label> |
| | | <label>${nickname}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group"> |
| | | <label class="control-label">ID:</label> |
| | | <label>${id}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label">注册时间:</label> |
| | | <label>${createTime}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-3 control-label form-group" style="margin-left: 150px"> |
| | | <label class="control-label">客户渠道:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label" >下单次数:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label" >取消次数:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">消费信息</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" > |
| | | <label class="col-sm-3 control-label" style="margin-left: -50px;font-weight: bolder;color: #0C0C0C;left: 100px">最近消费:</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-4 control-label form-group" > |
| | | <label class="col-sm-2 control-label" style="margin-left: -50px;font-weight: bolder;color: #0C0C0C;left: 100px">优惠劵:</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" style="margin-left: 70px"> |
| | | <label class="control-label">最近消费时间:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">未使用:</label> |
| | | <label>${notUsedCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-3 control-label form-group" > |
| | | <label class="control-label">已使用:</label> |
| | | <label>${usedCount}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" style="margin-left: 70px" > |
| | | <label class="control-label" >最近消费金额:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-4 control-label form-group" > |
| | | <label class="control-label">已过期:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" > |
| | | <label class="col-sm-3 control-label" style="margin-left: -50px;font-weight: bolder;color: #0C0C0C;left: 100px">累计消费/售后:</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-4 control-label form-group" > |
| | | <label class="col-sm-2 control-label" style="margin-left: -50px;font-weight: bolder;color: #0C0C0C;left: 100px">金额:</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" style="margin-left: 70px" > |
| | | <label class="control-label">总消费金额:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | <div class="initialLevel col-sm-2 control-label form-group" > |
| | | <label class="control-label">剩余:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div class="initialLevel col-sm-4 control-label form-group" style="margin-left: 70px" > |
| | | <label class="control-label">总消费次数:</label> |
| | | <label>${expiredCount}</label> |
| | | </div> |
| | | </div> |
| | | |
| | | <input hidden id="status" value="${status}"> |
| | | <div> |
| | | @if(status==1){ |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">启用理由</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | <div style="margin-left: 70px" > |
| | | <textarea id="stopRemark" style="width: 681px; height: 249px;" readonly>${remark}</textarea> |
| | | </div> |
| | | @} |
| | | @if(status==2){ |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">冻结理由</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | <div style="margin-left: 70px" > |
| | | <textarea id="startRemark" style="width: 681px; height: 249px;" readonly>${remark}</textarea> |
| | | </div> |
| | | @} |
| | | </div> |
| | | |
| | | <hr/> |
| | | <div class="initialLevel col-sm-12 control-label form-group" > |
| | | <div style="background-color: gray;height: 35px;line-height: 35px"> |
| | | <label style="color: #0C0C0C">交易明细</label> |
| | | </div> |
| | | </div> |
| | | <hr/> |
| | | <!--订单表分页--> |
| | | <#table id="TAppUserDetailOrderTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tCoupon.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUserException.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tOrder.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUserDetailOrder.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="createTime" name="注册时间"/> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="id" name="用户ID" /> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="nickName" name="昵称" /> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#NameCon id="phone" name="手机号" /> |
| | | </div> |
| | | <div class="col-sm-1"> |
| | | <select class="input-group" id="status" style="width: 80px;height: 33px" name="status"> |
| | | <option value="">状态</option> |
| | | <option value="1">正常</option> |
| | | <option value="2">冻结</option> |
| | | <option value="3">已删除</option> |
| | | </select> |
| | | </div> |
| | | <div class="col-sm-2"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TAppUserException.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TAppUserException.resetSearch()" space="true"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="导出" icon="" clickFun="TAppUserException.export()"/> |
| | | <button type="button" class="btn btn-primary " onclick="TAppUserException.searchCoupon()" id=""> |
| | | <i class="fa "></i> 赠送优惠劵 |
| | | </button> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TAppUserTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tAppUser/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TAppUser.openAddTAppUser()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tAppUser/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TAppUser.openTAppUserDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tAppUser/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TAppUser.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TAppUserExceptionTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUserException.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tCoupon.js"></script> |
| | | <script type="text/javascript"> |
| | | laydate.render({ |
| | | elem: '#createTime', |
| | | type: 'date', |
| | | range: true |
| | | }); |
| | | </script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input hidden id="id" value="${id}"> |
| | | <input hidden id="status" value="${status}"> |
| | | <div class="col-lg-3"> |
| | | @if(status==1){ |
| | | 冻结理由:<textarea id="stopRemark" placeholder="请输入冻结理由" style="width: 681px; height: 249px;"></textarea> |
| | | @} |
| | | @if(status==2){ |
| | | 启用理由:<textarea id="startRemark" placeholder="请输入启用理由" style="width: 681px; height: 249px;"></textarea> |
| | | @} |
| | | </div> |
| | | <div class="hidden-xs" id="TAppUserTableToolbar" role="group" style="margin-left:300px"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TAppUserInfoDlg.close()" /> |
| | | <#button name="确定" icon="fa-plus" clickFun="TAppUser.updateStatus()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser_info.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tCoupon.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUserException.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input hidden id="id" value="${id}"> |
| | | <input hidden id="status" value="${status}"> |
| | | <div class="col-lg-3"> |
| | | @if(status==1){ |
| | | 冻结理由:<textarea id="stopRemark" placeholder="请输入冻结理由" style="width: 681px; height: 249px;"></textarea> |
| | | @} |
| | | @if(status==2){ |
| | | 启用理由:<textarea id="startRemark" placeholder="请输入启用理由" style="width: 681px; height: 249px;"></textarea> |
| | | @} |
| | | </div> |
| | | <div class="hidden-xs" id="TAppUserTableToolbar" role="group" style="margin-left:300px"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TAppUserInfoDlg.closeException()" /> |
| | | <#button name="确定" icon="fa-plus" clickFun="TAppUserException.updateStatus()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser_info.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tCoupon.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUserException.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" underline="true"/> |
| | | <#input id="nickname" name="用户昵称" underline="true"/> |
| | | <#input id="phone" name="手机号" underline="true"/> |
| | | <#input id="sex" name="性别(1=男,2=女)" underline="true"/> |
| | | <#input id="avatar" name="头像" underline="true"/> |
| | | <#input id="openid" name="微信openid" underline="true"/> |
| | | <#input id="unionid" name="微信unionid"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="emergencyContact" name="紧急联系人" underline="true"/> |
| | | <#input id="emergencyPhone" name="紧急联系电话" underline="true"/> |
| | | <#input id="accountBalance" name="账户余额" underline="true"/> |
| | | <#input id="userTagId" name="用户标签id" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" underline="true"/> |
| | | <#input id="createTime" name="添加时间" underline="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TAppUserInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TAppUserInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" value="${item.id}" underline="true"/> |
| | | <#input id="nickname" name="用户昵称" value="${item.nickname}" underline="true"/> |
| | | <#input id="phone" name="手机号" value="${item.phone}" underline="true"/> |
| | | <#input id="sex" name="性别(1=男,2=女)" value="${item.sex}" underline="true"/> |
| | | <#input id="avatar" name="头像" value="${item.avatar}" underline="true"/> |
| | | <#input id="openid" name="微信openid" value="${item.openid}" underline="true"/> |
| | | <#input id="unionid" name="微信unionid" value="${item.unionid}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="emergencyContact" name="紧急联系人" value="${item.emergencyContact}" underline="true"/> |
| | | <#input id="emergencyPhone" name="紧急联系电话" value="${item.emergencyPhone}" underline="true"/> |
| | | <#input id="accountBalance" name="账户余额" value="${item.accountBalance}" underline="true"/> |
| | | <#input id="userTagId" name="用户标签id" value="${item.userTagId}" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" value="${item.status}" underline="true"/> |
| | | <#input id="createTime" name="添加时间" value="${item.createTime}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TAppUserInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TAppUserInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input hidden id="userIds" value="${userIds}"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="优惠券名称" placeholder="请输入优惠券名称"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCoupon.search()"/> |
| | | </div> |
| | | </div> |
| | | <#table id="TCouponTable"/> |
| | | <div class="hidden-xs" id="TAppUserTableToolbar" role="group" style="margin-left:650px"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TAppUserInfoDlg.close()" /> |
| | | <#button name="确定" icon="fa-plus" clickFun="TCoupon.sendCouponToUser()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tCoupon/tCoupon.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tCoupon.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <input hidden id="userIds" value="${userIds}"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="优惠券名称" placeholder="请输入优惠券名称"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCoupon.search()"/> |
| | | </div> |
| | | </div> |
| | | <#table id="TCouponTable"/> |
| | | <div class="hidden-xs" id="TAppUserTableToolbar" role="group" style="margin-left:650px"> |
| | | <#button name="取消" icon="fa-plus" clickFun="TAppUserInfoDlg.closeException()" /> |
| | | <#button name="确定" icon="fa-plus" clickFun="TAppUserException.sendCouponToUserException()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tCoupon/tCoupon.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tCoupon.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUserException.js"></script> |
| | | <script src="${ctxPath}/static/modular/system/tAppUser/tAppUser_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TCoupon.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TCouponTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tCoupon/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TCoupon.openAddTCoupon()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tCoupon/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TCoupon.openTCouponDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tCoupon/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TCoupon.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TCouponTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tCoupon/tCoupon.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" underline="true"/> |
| | | <#input id="createtime" name="创建时间"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="couponName" name="优惠券名称" underline="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCouponInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCouponInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tCoupon/tCoupon_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" value="${item.id}" underline="true"/> |
| | | <#input id="createtime" name="创建时间" value="${item.createtime}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="couponName" name="优惠券名称" value="${item.couponName}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TCouponInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCouponInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tCoupon/tCoupon_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="row"> |
| | | <div class="col-sm-12"> |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-title"> |
| | | <h5>管理</h5> |
| | | </div> |
| | | <div class="ibox-content"> |
| | | <div class="row row-lg"> |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="condition" name="名称" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TOrder.search()"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TOrderTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/tOrder/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="TOrder.openAddTOrder()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrder/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="TOrder.openTOrderDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/tOrder/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="TOrder.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="TOrderTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrder/tOrder.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" underline="true"/> |
| | | <#input id="code" name="编号" underline="true"/> |
| | | <#input id="userId" name="用户id" underline="true"/> |
| | | <#input id="driverId" name="司机id" underline="true"/> |
| | | <#input id="source" name="订单来源(1=小程序)" underline="true"/> |
| | | <#input id="agentId" name="代理商id" underline="true"/> |
| | | <#input id="branchOfficeId" name="分公司id" underline="true"/> |
| | | <#input id="startTime" name="开始服务时间" underline="true"/> |
| | | <#input id="startAddress" name="起点地址" underline="true"/> |
| | | <#input id="startLat" name="起点纬度" underline="true"/> |
| | | <#input id="startLng" name="起点经度" underline="true"/> |
| | | <#input id="endAddress" name="终点地址" underline="true"/> |
| | | <#input id="endLat" name="终点纬度"/> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="endLng" name="终点经度" underline="true"/> |
| | | <#input id="boardingTime" name="上车时间" underline="true"/> |
| | | <#input id="getoffTime" name="下车时间" underline="true"/> |
| | | <#input id="estimatedPrice" name="预估价" underline="true"/> |
| | | <#input id="orderMoney" name="订单金额" underline="true"/> |
| | | <#input id="payMoney" name="支付金额" underline="true"/> |
| | | <#input id="discountedPrice" name="优惠金额" underline="true"/> |
| | | <#input id="couponId" name="优惠券id" underline="true"/> |
| | | <#input id="payType" name="支付类型(1=线上)" underline="true"/> |
| | | <#input id="payTime" name="支付时间" underline="true"/> |
| | | <#input id="state" name="订单状态(1=待接单,2=已接单,3=)" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" underline="true"/> |
| | | <#input id="createTime" name="添加时间" underline="true"/> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TOrderInfoDlg.addSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TOrderInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrder/tOrder_info.js"></script> |
| | | @} |
New file |
| | |
| | | @layout("/common/_container.html"){ |
| | | <div class="ibox float-e-margins"> |
| | | <div class="ibox-content"> |
| | | <div class="form-horizontal"> |
| | | |
| | | <div class="row"> |
| | | <div class="col-sm-6 b-r"> |
| | | <#input id="id" name="主键" value="${item.id}" underline="true"/> |
| | | <#input id="code" name="编号" value="${item.code}" underline="true"/> |
| | | <#input id="userId" name="用户id" value="${item.userId}" underline="true"/> |
| | | <#input id="driverId" name="司机id" value="${item.driverId}" underline="true"/> |
| | | <#input id="source" name="订单来源(1=小程序)" value="${item.source}" underline="true"/> |
| | | <#input id="agentId" name="代理商id" value="${item.agentId}" underline="true"/> |
| | | <#input id="branchOfficeId" name="分公司id" value="${item.branchOfficeId}" underline="true"/> |
| | | <#input id="startTime" name="开始服务时间" value="${item.startTime}" underline="true"/> |
| | | <#input id="startAddress" name="起点地址" value="${item.startAddress}" underline="true"/> |
| | | <#input id="startLat" name="起点纬度" value="${item.startLat}" underline="true"/> |
| | | <#input id="startLng" name="起点经度" value="${item.startLng}" underline="true"/> |
| | | <#input id="endAddress" name="终点地址" value="${item.endAddress}" underline="true"/> |
| | | <#input id="endLat" name="终点纬度" value="${item.endLat}" /> |
| | | </div> |
| | | |
| | | <div class="col-sm-6"> |
| | | <#input id="endLng" name="终点经度" value="${item.endLng}" underline="true"/> |
| | | <#input id="boardingTime" name="上车时间" value="${item.boardingTime}" underline="true"/> |
| | | <#input id="getoffTime" name="下车时间" value="${item.getoffTime}" underline="true"/> |
| | | <#input id="estimatedPrice" name="预估价" value="${item.estimatedPrice}" underline="true"/> |
| | | <#input id="orderMoney" name="订单金额" value="${item.orderMoney}" underline="true"/> |
| | | <#input id="payMoney" name="支付金额" value="${item.payMoney}" underline="true"/> |
| | | <#input id="discountedPrice" name="优惠金额" value="${item.discountedPrice}" underline="true"/> |
| | | <#input id="couponId" name="优惠券id" value="${item.couponId}" underline="true"/> |
| | | <#input id="payType" name="支付类型(1=线上)" value="${item.payType}" underline="true"/> |
| | | <#input id="payTime" name="支付时间" value="${item.payTime}" underline="true"/> |
| | | <#input id="state" name="订单状态(1=待接单,2=已接单,3=)" value="${item.state}" underline="true"/> |
| | | <#input id="status" name="状态(1=正常,2=冻结,3=删除)" value="${item.status}" underline="true"/> |
| | | <#input id="createTime" name="添加时间" value="${item.createTime}" /> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10"> |
| | | <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="TOrderInfoDlg.editSubmit()"/> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TOrderInfoDlg.close()"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/tOrder/tOrder_info.js"></script> |
| | | @} |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TAppUser = { |
| | | id: "TAppUserTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TAppUser.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: false}, |
| | | {title: '用户ID', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户昵称', field: 'nickname', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '手机号', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '性别', field: 'sex', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '头像', field: 'avatar', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '微信openid', field: 'openid', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '微信unionid', field: 'unionid', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '紧急联系人', field: 'emergencyContact', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '紧急联系电话', field: 'emergencyPhone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '账户余额', field: 'accountBalance', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户标签id', field: 'userTagId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | // {title: '是否异常', field: 'isException', hidden:true, visible: true, align: 'center', valign: 'middle'}, |
| | | // {title: '启用冻结理由', field: 'remark', hidden:true,visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | if (row.status === 1){ |
| | | return '<a href="#" onclick="TAppUser.stop('+row.id+','+row.status+')" style="color:red">停用</a>' +' ' + |
| | | '<a href="#" onclick="TAppUser.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | }else if (row.status === 2){ |
| | | return '<a href="#" onclick="TAppUser.start('+row.id+','+row.status+')" style="color:green">启用</a>' +' ' + |
| | | '<a href="#" onclick="TAppUser.searchTAppUserDetail('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | } |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TAppUser.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TAppUser.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 用户信息导出 |
| | | */ |
| | | TAppUser.export=function(){ |
| | | var nickName=$("#nickName").val() |
| | | var status=$("#status").val() |
| | | var id=$("#id").val() |
| | | var createTime=$("#createTime").val() |
| | | var phone=$("#phone").val() |
| | | window.location.href=Feng.ctxPath + "/tAppUser/export-userInfo?nickname="+nickName |
| | | +"&status="+status |
| | | +"&id="+id |
| | | +"&createTime="+createTime |
| | | +"&phone="+phone |
| | | ; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TAppUser.openAddTAppUser = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUser_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 停用 |
| | | */ |
| | | TAppUser.stop = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '停用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUser_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 启动 |
| | | */ |
| | | TAppUser.start = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '启用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUser_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 提交启用冻结 |
| | | */ |
| | | TAppUser.updateStatus = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tAppUser/update-status", function (data) { |
| | | console.log(111111) |
| | | Feng.success("修改成功!"); |
| | | TAppUserInfoDlg.close(); |
| | | parent.TAppUser.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("status",$("#status").val()); |
| | | if($("#status").val() == 1){ |
| | | ajax.set("remark",$("#stopRemark").val()); |
| | | } |
| | | if($("#status").val() == 2){ |
| | | ajax.set("remark",$("#startRemark").val()); |
| | | } |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TAppUser.openTAppUserDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUser_update/' + TAppUser.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情(使用中) |
| | | */ |
| | | TAppUser.searchTAppUserDetail = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/userDetail?tAppUserId=' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TAppUser.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tAppUser/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TAppUser.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tAppUserId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询异常列表 |
| | | */ |
| | | TAppUser.searchExceptionList = function () { |
| | | var queryData = {}; |
| | | queryData.status = 2; |
| | | TAppUser.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TAppUser.search = function () { |
| | | var queryData = {}; |
| | | queryData.nickname = $("#nickName").val(); |
| | | queryData.phone = $("#phone").val(); |
| | | queryData.createTime = $("#createTime").val(); |
| | | queryData.id = $("#id").val(); |
| | | queryData.status = $("#status").val(); |
| | | TAppUser.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | /** |
| | | * 跳转优惠卷页面 |
| | | */ |
| | | TAppUser.searchCoupon = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | var data = []; |
| | | for (let i = 0; i < selected.length; i++) { |
| | | data[i] = selected[i].id; |
| | | } |
| | | if(this.check()){ |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '赠送优惠券', |
| | | area: ['80%', '80%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/sendCoupon?userIds=' + data |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | TAppUser.resetSearch = function (){ |
| | | $("#nickName").val(''); |
| | | $("#phone").val(''); |
| | | $("#createTime").val(''); |
| | | $("#id").val(''); |
| | | $("#status").val(''); |
| | | } |
| | | |
| | | $(function () { |
| | | var defaultColunms = TAppUser.initColumn(); |
| | | var table = new BSTable(TAppUser.id, "/tAppUser/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TAppUser.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TAppUserDetailOrderTable = { |
| | | id: "TAppUserDetailOrderTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TAppUserDetailOrderTable.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | // {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '创建时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起始地', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '目的地', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '总行驶里程(公里)', field: 'mileageSum', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '总行驶时间(分)', field: 'travelTimeSum', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '基础费用(元)', field: 'basicExpenses', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '等待时间(5)分钟', field: 'waitTimePrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '里程费(8.0)公里', field: 'mileagePrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '恶劣天气', field: 'badWeather', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付金额', field: 'payMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TAppUserDetailOrderTable.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TOrder.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TAppUserDetailOrderTable.openAddTOrder = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/tOrder_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TAppUserDetailOrderTable.openTOrderDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/tOrder_update/' + TAppUserDetailOrderTable.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TAppUserDetailOrderTable.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrder/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TAppUserDetailOrderTable.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tOrderId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TAppUserDetailOrderTable.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TAppUserDetailOrderTable.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TAppUserDetailOrderTable.initColumn(); |
| | | var table = new BSTable(TAppUserDetailOrderTable.id, "/tOrder/appUserDetailList", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TAppUserDetailOrderTable.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TAppUserException = { |
| | | id: "TAppUserExceptionTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TAppUserException.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: false}, |
| | | {title: '注册时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户ID', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户昵称', field: 'nickname', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '手机号', field: 'phone', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '剩余优惠券', field: 'sex', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券总数', field: 'avatar', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '消费次数', field: 'openid', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '历史消费', field: 'unionid', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '最后一次消费时间', field: 'emergencyContact', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态', field: 'status', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '操作', visible: true, align: 'center', valign: 'middle',width:150, |
| | | formatter: function (value, row) { |
| | | if (row.status === 1){ |
| | | return '<a href="#" onclick="TAppUserException.stop('+row.id+','+row.status+')" style="color:red">停用</a>' +' ' + |
| | | '<a href="#" onclick="TAppUserException.searchTAppUserDetailException('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | }else if (row.status === 2){ |
| | | return '<a href="#" onclick="TAppUserException.start('+row.id+','+row.status+')" style="color:green">启用</a>' +' ' + |
| | | '<a href="#" onclick="TAppUserException.searchTAppUserDetailException('+row.id+','+row.status+')" style="color:green">详情</a>' |
| | | } |
| | | } |
| | | } |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TAppUserException.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TAppUserException.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | |
| | | /** |
| | | * 异常页面导出 |
| | | */ |
| | | TAppUserException.export = function(){ |
| | | var nickName=$("#nickName").val() |
| | | var status=$("#status").val() |
| | | var id=$("#id").val() |
| | | var createTime=$("#createTime").val() |
| | | var phone=$("#phone").val() |
| | | window.location.href=Feng.ctxPath + "/tAppUser/export-exceptionUserInfo?nickname="+nickName |
| | | +"&status="+status |
| | | +"&id="+id |
| | | +"&createTime="+createTime |
| | | +"&phone="+phone |
| | | ; |
| | | } |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TAppUserException.openAddTAppUser = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUser_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 停用 |
| | | */ |
| | | TAppUserException.stop = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '停用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUserException_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 启动 |
| | | */ |
| | | TAppUserException.start = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '启用', |
| | | area: ['45%', '50%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUserException_start_and_stop?id='+id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 提交启用冻结 |
| | | */ |
| | | TAppUserException.updateStatus = function () { |
| | | var ajax = new $ax(Feng.ctxPath + "/tAppUser/update-status", function (data) { |
| | | Feng.success("修改成功!"); |
| | | TAppUserInfoDlg.closeException(); |
| | | parent.TAppUserException.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("status",$("#status").val()); |
| | | if($("#status").val() == 1){ |
| | | ajax.set("remark",$("#stopRemark").val()); |
| | | } |
| | | if($("#status").val() == 2){ |
| | | ajax.set("remark",$("#startRemark").val()); |
| | | } |
| | | ajax.start(); |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TAppUserException.openTAppUserDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUser_update/' + TAppUserException.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TAppUserException.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tAppUser/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TAppUserException.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tAppUserId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 用户异常列表 |
| | | */ |
| | | TAppUserException.tAppUserException = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '用户异常列表', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/tAppUser_exception' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TAppUserException.search = function () { |
| | | var queryData = {}; |
| | | queryData.nickname = $("#nickName").val(); |
| | | queryData.phone = $("#phone").val(); |
| | | queryData.createTime = $("#createTime").val(); |
| | | queryData.id = $("#id").val(); |
| | | queryData.status = $("#status").val(); |
| | | TAppUserException.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情(使用中) |
| | | */ |
| | | TAppUserException.searchTAppUserDetailException = function (id) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/userDetailException?tAppUserId=' + id |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 跳转优惠卷页面 |
| | | */ |
| | | TAppUserException.searchCoupon = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | var data = []; |
| | | for (let i = 0; i < selected.length; i++) { |
| | | data[i] = selected[i].id; |
| | | } |
| | | if(this.check()){ |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '赠送优惠券', |
| | | area: ['80%', '80%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/sendCouponException?userIds=' + data |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 发送优惠券 |
| | | */ |
| | | TAppUserException.sendCouponToUserException = function () { |
| | | if(TCoupon.check()){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCoupon/sendCouponToUser", function (data) { |
| | | Feng.success("发放成功!"); |
| | | TAppUserInfoDlg.closeException(); |
| | | parent.TAppUserException.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("发放失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.setData({ |
| | | userIds:$("#userIds").val(), |
| | | couponName:TCoupon.seItem.couponName |
| | | }) |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 重置 |
| | | */ |
| | | TAppUserException.resetSearch = function (){ |
| | | $("#nickName").val(''); |
| | | $("#phone").val(''); |
| | | $("#createTime").val(''); |
| | | $("#id").val(''); |
| | | $("#status").val(''); |
| | | } |
| | | |
| | | $(function () { |
| | | var defaultColunms = TAppUserException.initColumn(); |
| | | var table = new BSTable(TAppUserException.id, "/tAppUser/exceptionUserList", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TAppUserException.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TAppUserInfoDlg = { |
| | | tAppUserInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TAppUserInfoDlg.clearData = function() { |
| | | this.tAppUserInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TAppUserInfoDlg.set = function(key, val) { |
| | | this.tAppUserInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TAppUserInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TAppUserInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TAppUser.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TAppUserInfoDlg.closeException = function() { |
| | | parent.layer.close(window.parent.TAppUserException.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 取消冻结 |
| | | */ |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TAppUserInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('nickname') |
| | | .set('phone') |
| | | .set('sex') |
| | | .set('avatar') |
| | | .set('openid') |
| | | .set('unionid') |
| | | .set('emergencyContact') |
| | | .set('emergencyPhone') |
| | | .set('accountBalance') |
| | | .set('userTagId') |
| | | .set('status') |
| | | .set('createTime') |
| | | .set('remark'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TAppUserInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tAppUser/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TAppUser.table.refresh(); |
| | | TAppUserInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tAppUserInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TAppUserInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tAppUser/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TAppUser.table.refresh(); |
| | | TAppUserInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tAppUserInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TCoupon = { |
| | | id: "TCouponTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCoupon.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '创建时间', field: 'createtime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券名称', field: 'couponName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券类型', field: 'couponType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券码', field: 'couponCode', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券状态', field: 'couponStatus', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '服务类型', field: 'couponServiceType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '条件金额', field: 'couponConditionalAmount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'couponPreferentialAmount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '有效期', field: 'couponValidity', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '赠送数量', field: 'couponSendQuantity', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCoupon.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCoupon.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TCoupon.openAddTCoupon = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCoupon/tCoupon_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TCoupon.openTCouponDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCoupon/tCoupon_update/' + TCoupon.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TCoupon.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tCoupon/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TCoupon.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tCouponId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 发送优惠券 |
| | | */ |
| | | TCoupon.sendCouponToUser = function () { |
| | | if(this.check()){ |
| | | var ajax = new $ax(Feng.ctxPath + "/tCoupon/sendCouponToUser", function (data) { |
| | | Feng.success("发放成功!"); |
| | | TAppUserInfoDlg.close(); |
| | | parent.TAppUser.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("发放失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.setData({ |
| | | userIds:$("#userIds").val(), |
| | | couponName:this.seItem.couponName |
| | | }) |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 跳转优惠卷页面 |
| | | * ids : 用户id |
| | | */ |
| | | TCoupon.searchCoupon = function () { |
| | | if(this.check()){ |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '赠送优惠券', |
| | | area: ['80%', '80%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tAppUser/sendCoupon' |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TCoupon.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TCoupon.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCoupon.initColumn(); |
| | | var table = new BSTable(TCoupon.id, "/tCoupon/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TCoupon.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TOrder = { |
| | | id: "TOrderTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TOrder.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户id', field: 'userId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '司机id', field: 'driverId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单来源(1=小程序)', field: 'source', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理商id', field: 'agentId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '分公司id', field: 'branchOfficeId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '开始服务时间', field: 'startTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点纬度', field: 'startLat', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点经度', field: 'startLng', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点纬度', field: 'endLat', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点经度', field: 'endLng', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '上车时间', field: 'boardingTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '下车时间', field: 'getoffTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '预估价', field: 'estimatedPrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单金额', field: 'orderMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付金额', field: 'payMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'discountedPrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券id', field: 'couponId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付类型(1=线上)', field: 'payType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付时间', field: 'payTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单状态(1=待接单,2=已接单,3=)', field: 'state', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态(1=正常,2=冻结,3=删除)', field: 'status', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TOrder.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TOrder.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TOrder.openAddTOrder = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/tOrder_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TOrder.openTOrderDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/tOrder_update/' + TOrder.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TOrder.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrder/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TOrder.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tOrderId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TOrder.search = function () { |
| | | var queryData = {}; |
| | | queryData['userId'] = $("#userId").val(); |
| | | TOrder.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TOrder.initColumn(); |
| | | var table = new BSTable(TOrder.id, "/tOrder/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TOrder.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TCoupon = { |
| | | id: "TCouponTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TCoupon.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '创建时间', field: 'createtime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券名称', field: 'couponName', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券类型', field: 'couponType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券码', field: 'couponCode', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券状态', field: 'couponStatus', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '服务类型', field: 'couponServiceType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '条件金额', field: 'couponConditionalAmount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'couponPreferentialAmount', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '有效期', field: 'couponValidity', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '赠送数量', field: 'couponSendQuantity', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TCoupon.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TCoupon.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TCoupon.openAddTCoupon = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCoupon/tCoupon_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TCoupon.openTCouponDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tCoupon/tCoupon_update/' + TCoupon.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TCoupon.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tCoupon/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TCoupon.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tCouponId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TCoupon.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TCoupon.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TCoupon.initColumn(); |
| | | var table = new BSTable(TCoupon.id, "/tCoupon/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TCoupon.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TCouponInfoDlg = { |
| | | tCouponInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TCouponInfoDlg.clearData = function() { |
| | | this.tCouponInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCouponInfoDlg.set = function(key, val) { |
| | | this.tCouponInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TCouponInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TCouponInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TCoupon.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TCouponInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('createtime') |
| | | .set('couponName'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TCouponInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCoupon/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TCoupon.table.refresh(); |
| | | TCouponInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tCouponInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TCouponInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tCoupon/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TCoupon.table.refresh(); |
| | | TCouponInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tCouponInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var TOrder = { |
| | | id: "TOrderTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | TOrder.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: '主键', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '编号', field: 'code', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '用户id', field: 'userId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '司机id', field: 'driverId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单来源(1=小程序)', field: 'source', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '代理商id', field: 'agentId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '分公司id', field: 'branchOfficeId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '开始服务时间', field: 'startTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点地址', field: 'startAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点纬度', field: 'startLat', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '起点经度', field: 'startLng', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点地址', field: 'endAddress', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点纬度', field: 'endLat', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '终点经度', field: 'endLng', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '上车时间', field: 'boardingTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '下车时间', field: 'getoffTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '预估价', field: 'estimatedPrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单金额', field: 'orderMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付金额', field: 'payMoney', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠金额', field: 'discountedPrice', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券id', field: 'couponId', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付类型(1=线上)', field: 'payType', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '支付时间', field: 'payTime', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '订单状态(1=待接单,2=已接单,3=)', field: 'state', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '状态(1=正常,2=冻结,3=删除)', field: 'status', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '添加时间', field: 'createTime', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | TOrder.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | TOrder.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | TOrder.openAddTOrder = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/tOrder_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | TOrder.openTOrderDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/tOrder/tOrder_update/' + TOrder.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | TOrder.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrder/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | TOrder.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("tOrderId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | TOrder.search = function () { |
| | | var queryData = {}; |
| | | queryData['condition'] = $("#condition").val(); |
| | | TOrder.table.refresh({query: queryData}); |
| | | }; |
| | | |
| | | $(function () { |
| | | var defaultColunms = TOrder.initColumn(); |
| | | var table = new BSTable(TOrder.id, "/tOrder/list", defaultColunms); |
| | | table.setPaginationType("client"); |
| | | TOrder.table = table.init(); |
| | | }); |
New file |
| | |
| | | /** |
| | | * 初始化详情对话框 |
| | | */ |
| | | var TOrderInfoDlg = { |
| | | tOrderInfoData : {} |
| | | }; |
| | | |
| | | /** |
| | | * 清除数据 |
| | | */ |
| | | TOrderInfoDlg.clearData = function() { |
| | | this.tOrderInfoData = {}; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TOrderInfoDlg.set = function(key, val) { |
| | | this.tOrderInfoData[key] = (typeof val == "undefined") ? $("#" + key).val() : val; |
| | | return this; |
| | | } |
| | | |
| | | /** |
| | | * 设置对话框中的数据 |
| | | * |
| | | * @param key 数据的名称 |
| | | * @param val 数据的具体值 |
| | | */ |
| | | TOrderInfoDlg.get = function(key) { |
| | | return $("#" + key).val(); |
| | | } |
| | | |
| | | /** |
| | | * 关闭此对话框 |
| | | */ |
| | | TOrderInfoDlg.close = function() { |
| | | parent.layer.close(window.parent.TOrder.layerIndex); |
| | | } |
| | | |
| | | /** |
| | | * 收集数据 |
| | | */ |
| | | TOrderInfoDlg.collectData = function() { |
| | | this |
| | | .set('id') |
| | | .set('code') |
| | | .set('userId') |
| | | .set('driverId') |
| | | .set('source') |
| | | .set('agentId') |
| | | .set('branchOfficeId') |
| | | .set('startTime') |
| | | .set('startAddress') |
| | | .set('startLat') |
| | | .set('startLng') |
| | | .set('endAddress') |
| | | .set('endLat') |
| | | .set('endLng') |
| | | .set('boardingTime') |
| | | .set('getoffTime') |
| | | .set('estimatedPrice') |
| | | .set('orderMoney') |
| | | .set('payMoney') |
| | | .set('discountedPrice') |
| | | .set('couponId') |
| | | .set('payType') |
| | | .set('payTime') |
| | | .set('state') |
| | | .set('status') |
| | | .set('createTime'); |
| | | } |
| | | |
| | | /** |
| | | * 提交添加 |
| | | */ |
| | | TOrderInfoDlg.addSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrder/add", function(data){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TOrder.table.refresh(); |
| | | TOrderInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tOrderInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TOrderInfoDlg.editSubmit = function() { |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tOrder/update", function(data){ |
| | | Feng.success("修改成功!"); |
| | | window.parent.TOrder.table.refresh(); |
| | | TOrderInfoDlg.close(); |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tOrderInfoData); |
| | | ajax.start(); |
| | | } |
| | | |
| | | $(function() { |
| | | |
| | | }); |