Merge branch '2.0' of http://120.76.84.145:10101/gitblit/r/java/IgoTravel into 2.0
# Conflicts:
# ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TServerCarmodelController.java
# ManagementIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/model/TServerCarmodel.java
| | |
| | | private IUserRedPacketRecordService userRedPacketRecordService; |
| | | |
| | | |
| | | @RequestMapping("/redRecord") |
| | | public String index( Model model,Integer couponActivityId,Integer activityType) { |
| | | model.addAttribute("activityType",activityType); |
| | | model.addAttribute("couponActivityId",couponActivityId); |
| | | return PREFIX + "userRedRecord.html"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 跳转到首页 |
| | | */ |
| | |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/user/list") |
| | | @ResponseBody |
| | | public Object list(String createTime,String userName,String userPhone,Integer couponActivityId,Integer activityType,Integer state) { |
| | | String beginTime = null; |
| | | String endTime = null; |
| | | if (SinataUtil.isNotEmpty(createTime)){ |
| | | String[] timeArray = createTime.split(" - "); |
| | | beginTime = timeArray[0]; |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | page.setRecords(sysRedPacketRecordService.getList(page,beginTime,endTime,userName,userPhone,couponActivityId,activityType,state)); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | /** |
| | | * 获取列表 |
| | | */ |
| | |
| | | //查询所有专车车型 |
| | | Integer objectId = ShiroKit.getUser().getObjectId(); |
| | | List<TSystemPrice> tSystemPrices = tSystemPriceService.selectList(new EntityWrapper<TSystemPrice>().eq("type", 4).eq("companyId", objectId).ne("state", 3)); |
| | | List<TServerCarmodel> modelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("isPackage", 1).eq("state", 1)); |
| | | List<TServerCarmodel> modelList = tServerCarmodelService.selectList(new EntityWrapper<TServerCarmodel>().eq("type", 4)); |
| | | List<TServerCarmodel> serverCarmodels = new ArrayList<>(); |
| | | for(TServerCarmodel tsc : modelList){ |
| | | boolean b = true; |
| | |
| | | package com.stylefeng.guns.modular.system.dao; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.SysRedPacketRecord; |
| | | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface SysRedPacketRecordMapper extends BaseMapper<SysRedPacketRecord> { |
| | | |
| | | } |
| | | List<Map<String,Object>> getList(@Param("page") Page<Map<String, Object>> page, |
| | | @Param("beginTime") String beginTime, |
| | | @Param("endTime") String endTime, |
| | | @Param("userName") String userName, |
| | | @Param("userPhone") String userPhone, |
| | | @Param("couponActivityId") Integer couponActivityId, |
| | | @Param("activityType") Integer activityType, |
| | | @Param("state") Integer state);} |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, money, insertTime, companyId, name, type, totalMoney, laveMoney, startMoney, endMoney, effective, companyType |
| | | </sql> |
| | | <select id="getList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page"> |
| | | SELECT |
| | | c.id, |
| | | c.money, |
| | | c.insertTime, |
| | | c.companyId, |
| | | c.state, |
| | | c.userId, |
| | | u.nickName, |
| | | u.phone |
| | | FROM |
| | | t_user_red_packet_record c |
| | | LEFT JOIN t_user u ON c.userId = u.id |
| | | |
| | | WHERE 1=1 |
| | | <if test="beginTime != null and beginTime !='' and endTime != null and endTime != ''"> |
| | | and (c.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59')) |
| | | </if> |
| | | <if test="userName != null and userName !=''"> |
| | | and u.nickName like CONCAT('%',#{userName},'%') |
| | | </if> |
| | | <if test="userPhone != null and userPhone !=''"> |
| | | and u.phone like CONCAT('%',#{userPhone},'%') |
| | | </if> |
| | | <if test="couponActivityId != null"> |
| | | and c.redPacketActivityId=#{couponActivityId} |
| | | </if> |
| | | <if test="state != null and state !=''"> |
| | | and c.state=#{state} |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | /** |
| | | * 有效天数 |
| | | */ |
| | | private Integer effective; |
| | | // private Integer effective; |
| | | /** |
| | | * 1=平台 2=分公司 3=加盟商 |
| | | */ |
| | |
| | | this.endMoney = endMoney; |
| | | } |
| | | |
| | | public Integer getEffective() { |
| | | return effective; |
| | | } |
| | | |
| | | public void setEffective(Integer effective) { |
| | | this.effective = effective; |
| | | } |
| | | // public Integer getEffective() { |
| | | // return effective; |
| | | // } |
| | | // |
| | | // public void setEffective(Integer effective) { |
| | | // this.effective = effective; |
| | | // } |
| | | |
| | | public Integer getCompanyType() { |
| | | return companyType; |
| | |
| | | ", laveMoney=" + laveMoney + |
| | | ", startMoney=" + startMoney + |
| | | ", endMoney=" + endMoney + |
| | | ", effective=" + effective + |
| | | // ", effective=" + effective + |
| | | ", companyType=" + companyType + |
| | | "}"; |
| | | } |
| | |
| | | /** |
| | | * 是否勾选了专车 0否1是 |
| | | */ |
| | | // private Integer isPrivateCar; |
| | | /** |
| | | * 是否勾选了包裹 0否1是 |
| | | */ |
| | | // private Integer isPackage; |
| | | |
| | | /** |
| | | * 添加时间 |
| | |
| | | package com.stylefeng.guns.modular.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.SysRedPacketRecord; |
| | | import com.baomidou.mybatisplus.service.IService; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2020-06-13 |
| | | */ |
| | | public interface ISysRedPacketRecordService extends IService<SysRedPacketRecord> { |
| | | List<Map<String,Object>> getList(Page<Map<String, Object>> page, |
| | | String beginTime, |
| | | String endTime, |
| | | String userName, |
| | | String userPhone, |
| | | Integer couponActivityId, |
| | | Integer activityType, Integer state); |
| | | |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.modular.system.model.SysRedPacketRecord; |
| | | import com.stylefeng.guns.modular.system.dao.SysRedPacketRecordMapper; |
| | | import com.stylefeng.guns.modular.system.service.ISysRedPacketRecordService; |
| | | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class SysRedPacketRecordServiceImpl extends ServiceImpl<SysRedPacketRecordMapper, SysRedPacketRecord> implements ISysRedPacketRecordService { |
| | | |
| | | @Override |
| | | public List<Map<String, Object>> getList(Page<Map<String, Object>> page, String beginTime, String endTime, String userName, String userPhone, Integer couponActivityId, Integer activityType, Integer state) { |
| | | return this.baseMapper.getList(page,beginTime,endTime,userName,userPhone,couponActivityId,activityType,state); |
| | | } |
| | | } |
| | |
| | | |
| | | spring: |
| | | datasource: |
| | | url: jdbc:mysql://182.160.16.251:3306/igotravel?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | url: jdbc:mysql://192.168.110.80:3306/igotravel2.0?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: HjKbXilb9zajmXbl |
| | | password: 123456 |
| | | db-name: igotravel #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | |
| | | <div class="hidden-xs" id="SysRedPacketRecordTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/sysRedPacketRecord/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="SysRedPacketRecord.openAddSysRedPacketRecord()"/> |
| | | <#button name="指定派发" icon="fa-plus" clickFun="SysRedPacketRecord.userList()"/> |
| | | <#button name="领取记录" icon="fa-remove" clickFun="SysRedPacketRecord.userCouponRecord()" space="true"/> |
| | | <#button name="指定派发" icon="fa-plus" clickFun="SysRedPacketRecord.userList()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/sysRedPacketRecord/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="SysRedPacketRecord.openSysRedPacketRecordDetail()" space="true"/> |
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 type="hidden" id="activityType" value="${activityType}"> |
| | | <input type="hidden" id="couponActivityId" value="${couponActivityId}"> |
| | | <div class="row"> |
| | | <div class="col-sm-3"> |
| | | <#TimeCon id="createTime" name="领取时间" isTime="false"/> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="userName" name="领取人" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="userPhone" name="领取人电话" /> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#SelectCon id="state" name="状态" > |
| | | <option value="">全部</option> |
| | | <option value="1">未使用</option> |
| | | <option value="2">已使用</option> |
| | | <option value="3">已过期</option> |
| | | </#SelectCon> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="UserCouponRecord.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="UserCouponRecord.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="UserCouponRecordTableToolbar" role="group"> |
| | | @if(shiro.hasPermission("/userCouponRecord/add")){ |
| | | <#button name="添加" icon="fa-plus" clickFun="UserCouponRecord.openAddUserCouponRecord()"/> |
| | | @} |
| | | @if(shiro.hasPermission("/userCouponRecord/update")){ |
| | | <#button name="修改" icon="fa-edit" clickFun="UserCouponRecord.openUserCouponRecordDetail()" space="true"/> |
| | | @} |
| | | @if(shiro.hasPermission("/userCouponRecord/delete")){ |
| | | <#button name="删除" icon="fa-remove" clickFun="UserCouponRecord.delete()" space="true"/> |
| | | @} |
| | | </div> |
| | | <#table id="UserCouponRecordTable"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/static/modular/system/sysRedPacketRecord/userRedRecord.js"></script> |
| | | <script> |
| | | laydate.render({ |
| | | elem: '#createTime' |
| | | ,range: true |
| | | }); |
| | | </script> |
| | | @} |
| | |
| | | <div class="tab-content"> |
| | | <div id="tab-1" class="tab-pane active"> |
| | | <input type="hidden" id="id1" value="${one.id}"> |
| | | <div class="col-sm-3" style="padding-top: 10px;display: none;"> |
| | | <div class="col-sm-3" style="padding-top: 10px;"> |
| | | <div class="input-group" style="width: 100%;"> |
| | | <select class="form-control" id="language1"> |
| | | <option value="1">中文</option> |
| | |
| | | <div class="tab-content"> |
| | | <div id="tab-1" class="tab-pane active"> |
| | | <input type="hidden" id="id1" value="${one.id}"> |
| | | <div class="col-sm-3" style="padding-top: 10px;display: none;"> |
| | | <div class="col-sm-3" style="padding-top: 10px;"> |
| | | <div class="input-group" style="width: 100%;"> |
| | | <select class="form-control" id="language1"> |
| | | <option value="1">中文</option> |
| | |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | SysRedPacketRecord.userCouponRecord= function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '领取记录', |
| | | area: ['100%', '100%'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/sysRedPacketRecord/redRecord?activityType=1&couponActivityId='+ SysRedPacketRecord.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
New file |
| | |
| | | /** |
| | | * 管理初始化 |
| | | */ |
| | | var UserCouponRecord = { |
| | | id: "UserCouponRecordTable", //表格id |
| | | seItem: null, //选中的条目 |
| | | table: null, |
| | | layerIndex: -1 |
| | | }; |
| | | |
| | | /** |
| | | * 初始化表格的列 |
| | | */ |
| | | UserCouponRecord.initColumn = function () { |
| | | return [ |
| | | {title: '', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '领取时间', field: 'insertTime', 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: 'money', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '到期时间', field: 'expirationTime', visible: true, align: 'center', valign: 'middle'}, |
| | | // {title: '领取类型', field: 'couponUseType', visible: true, align: 'center', valign: 'middle', |
| | | // formatter: function (value, row) { |
| | | // if(value==0){ |
| | | // return "通用优惠券"; |
| | | // }else if(value==1){ |
| | | // return "打车优惠券"; |
| | | // }else if(value==2){ |
| | | // return "出租券"; |
| | | // }else if(value==4){ |
| | | // return "包裹优惠券"; |
| | | // }else{ |
| | | // return ""; |
| | | // } |
| | | // } |
| | | // } , |
| | | {title: '状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row) { |
| | | if(value==1){ |
| | | return "未使用"; |
| | | }else if(value==2){ |
| | | return "已使用"; |
| | | }else if(value==3){ |
| | | return "已过期"; |
| | | }else{ |
| | | return ""; |
| | | } |
| | | } |
| | | } |
| | | // , |
| | | // {title: '使用时间', field: 'useTime', visible: true, align: 'center', valign: 'middle'} |
| | | ]; |
| | | }; |
| | | |
| | | /** |
| | | * 检查是否选中 |
| | | */ |
| | | UserCouponRecord.check = function () { |
| | | var selected = $('#' + this.id).bootstrapTable('getSelections'); |
| | | if(selected.length == 0){ |
| | | Feng.info("请先选中表格中的某一记录!"); |
| | | return false; |
| | | }else{ |
| | | UserCouponRecord.seItem = selected[0]; |
| | | return true; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 点击添加 |
| | | */ |
| | | UserCouponRecord.openAddUserCouponRecord = function () { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '添加', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/userCouponRecord/userCouponRecord_add' |
| | | }); |
| | | this.layerIndex = index; |
| | | }; |
| | | |
| | | /** |
| | | * 打开查看详情 |
| | | */ |
| | | UserCouponRecord.openUserCouponRecordDetail = function () { |
| | | if (this.check()) { |
| | | var index = layer.open({ |
| | | type: 2, |
| | | title: '详情', |
| | | area: ['800px', '420px'], //宽高 |
| | | fix: false, //不固定 |
| | | maxmin: true, |
| | | content: Feng.ctxPath + '/userCouponRecord/userCouponRecord_update/' + UserCouponRecord.seItem.id |
| | | }); |
| | | this.layerIndex = index; |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | UserCouponRecord.delete = function () { |
| | | if (this.check()) { |
| | | var ajax = new $ax(Feng.ctxPath + "/userCouponRecord/delete", function (data) { |
| | | Feng.success("删除成功!"); |
| | | UserCouponRecord.table.refresh(); |
| | | }, function (data) { |
| | | Feng.error("删除失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set("userCouponRecordId",this.seItem.id); |
| | | ajax.start(); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 查询列表 |
| | | */ |
| | | UserCouponRecord.search = function () { |
| | | var queryData = {}; |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | queryData['activityType'] = $("#activityType").val(); |
| | | queryData['couponActivityId'] = $("#couponActivityId").val(); |
| | | queryData['userName'] = $("#userName").val(); |
| | | queryData['userPhone'] = $("#userPhone").val(); |
| | | queryData['state'] = $("#state").val(); |
| | | UserCouponRecord.table.refresh({query: queryData}); |
| | | }; |
| | | UserCouponRecord.resetSearch = function () { |
| | | $("#createTime").val(""); |
| | | $("#userName").val(""); |
| | | $("#userPhone").val(""); |
| | | $("#state").val(""); |
| | | UserCouponRecord.search(); |
| | | }; |
| | | $(function () { |
| | | var defaultColunms = UserCouponRecord.initColumn(); |
| | | var table = new BSTable(UserCouponRecord.id, "/sysRedPacketRecord/user/list", defaultColunms); |
| | | table.setPaginationType("server"); |
| | | var queryData = {}; |
| | | queryData['createTime'] = $("#createTime").val(); |
| | | queryData['activityType'] = $("#activityType").val(); |
| | | queryData['couponActivityId'] = $("#couponActivityId").val(); |
| | | table.setQueryParams(queryData); |
| | | UserCouponRecord.table = table.init(); |
| | | }); |