| | |
| | | <select id="selectAll" resultType="com.dsh.account.dto.TStudentDto"> |
| | | SELECT * FROM ( |
| | | SELECT |
| | | st.* ,us.`name` AS userName,us.province,us.city |
| | | st.* ,us.`name` AS userName,us.provinceCode as province,us.cityCode as city |
| | | FROM |
| | | t_student st |
| | | LEFT JOIN t_app_user us on st.appUserId = us.id) o |
| | | <where> |
| | | |
| | | <if test="item.province != null and item.province != ''"> |
| | | and o.province LIKE CONCAT('%',#{item.province},'%') |
| | | and o.province = #{item.province} |
| | | </if> |
| | | <if test="item.city != null and item.city != ''"> |
| | | and o.city LIKE CONCAT('%',#{item.city},'%') |
| | | and o.city = #{item.city} |
| | | </if> |
| | | <if test="item.name != null and item.name != ''"> |
| | | and o.name LIKE CONCAT('%',#{item.name},'%') |
| | |
| | | Integer publisherType = (Integer) stringObjectMap.get("publisherType"); |
| | | if (publisherType!=null) { |
| | | if (publisherType == 1) { |
| | | Integer cityManagerId = (Integer) stringObjectMap.get("cityManagerId"); |
| | | TCityManager byId = citClient.getById(cityManagerId); |
| | | stringObjectMap.put("province", byId.getProvince()); |
| | | |
| | | stringObjectMap.put("city", byId.getCity()); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | if (dataVo.getUserType() == 1){ |
| | | coupon.setPublisherType(2); |
| | | coupon.setAuditStatus(2); |
| | | coupon.setCityManagerId(dataVo.getCityManagerId()); |
| | | } |
| | | if (dataVo.getUserType() == 2){ |
| | | coupon.setPublisherType(1); |
| | | coupon.setCityManagerId(dataVo.getCityManagerId()); |
| | | } |
| | | if(dataVo.getObjType()!=1){ |
| | | coupon.setAuditStatus(1); |
| | | } |
| | | if (dataVo.getUserType()==1){ |
| | | if (dataVo.getUserType() == 3){ |
| | | coupon.setPublisherType(3); |
| | | coupon.setAuditStatus(2); |
| | | }else{ |
| | | coupon.setAuditStatus(1); |
| | | } |
| | | if(dataVo.getObjType()!=1){ |
| | | coupon.setAuditStatus(1); |
| | | coupon.setCityManagerId(dataVo.getCityManagerId()); |
| | | } |
| | | |
| | | boolean save = couponService.save(coupon); |
| | |
| | | from t_coupon_city |
| | | WHERE provinceCode = #{cityCode}) o) |
| | | </if> |
| | | <if test="name != null"> |
| | | <if test="name != null and name!=''"> |
| | | and `name` like concat('%', #{name}, '%') |
| | | </if> |
| | | <if test="type != null"> |
| | |
| | | illustrate |
| | | from t_coupon |
| | | where 1 = 1 and distributionMethod = 4 |
| | | and auditStatus = 2 |
| | | and startTime < now() |
| | | <if test="cityCode != null"> |
| | | and id in( |
| | | SELECT DISTINCT couponId FROM |
| | |
| | | illustrate |
| | | from t_coupon |
| | | where 1 = 1 and distributionMethod = 4 and useScope = 1 |
| | | |
| | | and auditStatus = 2 |
| | | and startTime < now() |
| | | <if test="name != null"> |
| | | and `name` like concat('%', #{name}, '%') |
| | | </if> |
| | |
| | | @ResponseBody |
| | | @PostMapping("/coursePackageDiscount/setCoursePackageDiscount") |
| | | public void setCoursePackageDiscount(@RequestBody List<TCoursePackageDiscount> list){ |
| | | for (TCoursePackageDiscount tCoursePackageDiscount : list) { |
| | | tCoursePackageDiscount.setStatus(1); |
| | | } |
| | | TCoursePackageDiscount tCoursePackageDiscount = list.get(0); |
| | | coursePackageDiscountService.remove(new QueryWrapper<TCoursePackageDiscount>().eq("coursePackageId", tCoursePackageDiscount.getCoursePackageId())); |
| | | if(list.size() > 0){ |
| | |
| | | .eq(TCoursePackageDiscount::getCoursePackageId, |
| | | discountList.getCourseId()) |
| | | .orderByAsc(TCoursePackageDiscount::getType)); |
| | | long count = tCoursePackageDiscounts.stream().count(); |
| | | if(count>0){ |
| | | discountList.setStatus(2); |
| | | }else { |
| | | discountList.setStatus(1); |
| | | } |
| | | |
| | | String type=""; |
| | | for (int i = 0; i < tCoursePackageDiscounts.size(); i++) { |
| | | if(tCoursePackageDiscounts.get(i).getType()==1){ |
| | |
| | | public Object listUser(@PathVariable Integer id,Integer state) { |
| | | try { |
| | | Page<Object> page = new PageFactory<>().defaultPage(); |
| | | Page<CompetitionUser> data = competitionClient.getPeopleFromId |
| | | Page<CompetitionUser> data = competitionClient.getPeopleFromId |
| | | (new GetPeopleQuery(page.getSize(),page.getCurrent(),id,state)); |
| | | return super.packForBT(data); |
| | | }catch (Exception e){ |
| | |
| | | |
| | | if (UserExt.getUser().getObjectType() == 1){ |
| | | competition.setAuditStatus(2); |
| | | }else { |
| | | }else if (UserExt.getUser().getObjectType() == 2){ |
| | | competition.setAuditStatus(1); |
| | | competition.setOperatorId(UserExt.getUser().getObjectId()); |
| | | } |
| | | |
| | | // SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | dataVo.setUserType(objectType); |
| | | dataVo.setCityManagerId(UserExt.getUser().getObjectId()); |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | if(UserExt.getUser().getObjectType()==2){ |
| | | dataVo.setCompany(3); |
| | | dataVo.setUserType(2); |
| | | }else if(UserExt.getUser().getObjectType()==3){ |
| | | dataVo.setStoreIds(UserExt.getUser().getObjectId().toString()); |
| | | dataVo.setCompany(3); |
| | | } |
| | | dataVo.setObjType(UserExt.getUser().getObjectType()); |
| | | if(UserExt.getUser().getObjectType()==3){ |
| | | dataVo.setStoreIds(UserExt.getUser().getObjectId().toString()); |
| | | dataVo.setCompany(3); |
| | | }else{ |
| | | dataVo.setUserType(1); |
| | | } |
| | | dataVo.setObjType(UserExt.getUser().getObjectType()); |
| | | client.insertIntoData(dataVo); |
| | |
| | | } |
| | | List<TStore> list = storeService.list(wrapper); |
| | | Page<DiscountList> page = new PageFactory<DiscountList>().defaultPage(); |
| | | List<DiscountList> discountLists = courseClient.queryDiscountList(new QueryDiscountList(page.getCurrent(),page.getSize(),provinceCode,cityCode,name,type,list.stream().map(TStore::getId).collect(Collectors.toList()))); |
| | | List<DiscountList> discountLists = courseClient.queryDiscountList(new QueryDiscountList |
| | | (page.getCurrent(),page.getSize(),provinceCode,cityCode,name,type, |
| | | list.stream().map(TStore::getId).collect(Collectors.toList()))); |
| | | for (DiscountList discountList : discountLists) { |
| | | for (TStore tStore : list) { |
| | | if(discountList.getStoreId().equals(tStore.getId())){ |
| | |
| | | @RequestMapping("/getCityYys") |
| | | @ResponseBody |
| | | public Object getCityYys(String province,Integer operatorId) { |
| | | |
| | | if (UserExt.getUser().getObjectType() == 2){ |
| | | operatorId = UserExt.getUser().getObjectId(); |
| | | } |
| | | // 通过选择的省 获取管理的市 |
| | | TOperatorCity byId = operatorCityService.getOne(new QueryWrapper<TOperatorCity>() |
| | | .eq("code",province).eq("operatorId",operatorId)); |
| | |
| | | }else{ |
| | | tStore.setOperatorId(yyId); |
| | | } |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | tStore.setOperatorId(UserExt.getUser().getObjectId()); |
| | | } |
| | | storeService.save(tStore); |
| | | user.setObjectId(tStore.getId()); |
| | | userService.updateById(user); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | for (int i = 1; i < 9; i++) { |
| | | StoreConfig storeConfig = new StoreConfig(); |
| | |
| | | byId.setUrl(url); |
| | | } |
| | | byId.setName(name); |
| | | TTurn byId1 = tTurnService.getById(page); |
| | | TTurn byId2 = tTurnService.getById(type); |
| | | byId.setPage(byId1.getName()); |
| | | byId.setType(byId2.getName()); |
| | | if(page!=null){ |
| | | TTurn byId1 = tTurnService.getById(page); |
| | | byId.setPage(byId1.getName()); |
| | | } |
| | | if(page!=null){ |
| | | TTurn byId2 = tTurnService.getById(type); |
| | | byId.setType(byId2.getName()); |
| | | } |
| | | byId.setTurnId(turnId); |
| | | byId.setSort(sort); |
| | | byId.setPageId(page); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/addConfigOne9") |
| | | @ResponseBody |
| | | public Object addConfigOne9(String url,String name,Integer page,Integer type,String turnId,Integer sort,Integer id) { |
| | | try { |
| | | TStoreOtherConfigTrue byId = new TStoreOtherConfigTrue(); |
| | | byId.setPid(id); |
| | | if(ToolUtil.isNotEmpty(url)){ |
| | | byId.setUrl(url); |
| | | } |
| | | byId.setName(name); |
| | | if(page!=null){ |
| | | TTurn byId1 = tTurnService.getById(page); |
| | | byId.setPage(byId1.getName()); |
| | | } |
| | | if(page!=null){ |
| | | TTurn byId2 = tTurnService.getById(type); |
| | | byId.setType(byId2.getName()); |
| | | } |
| | | byId.setTurnId(turnId); |
| | | byId.setSort(sort); |
| | | byId.setPageId(page); |
| | | byId.setTypeId(type); |
| | | byId.setState(1); |
| | | tStoreOtherConfigTrueService.save(byId); |
| | | return SUCCESS_TIP; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ERROR; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | siteBooking.setInsertTime(new Date()); |
| | | siteBooking.setState(1); |
| | | siteBooking.setStatus(0); |
| | | siteBooking.setAddType(1); |
| | | // 查询当前预约人是否是会员 |
| | | String phone = siteBooking.getPhone(); |
| | | String booker = siteBooking.getBooker(); |
| | |
| | | package com.dsh.guns.modular.system.controller.system; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.course.dto.*; |
| | | import com.dsh.course.entity.EvaluateStudent; |
| | |
| | | import com.dsh.guns.core.base.controller.BaseController; |
| | | import com.dsh.guns.modular.system.model.*; |
| | | import com.dsh.guns.modular.system.model.dto.*; |
| | | import com.dsh.guns.modular.system.service.EvaluateStudentService; |
| | | import com.dsh.guns.modular.system.service.ISiteBookingService; |
| | | import com.dsh.guns.modular.system.service.IStoreService; |
| | | import com.dsh.guns.modular.system.service.ITStudentService; |
| | | import com.dsh.guns.modular.system.service.*; |
| | | import com.dsh.guns.modular.system.util.BigDecimalToChineseAmountUtil; |
| | | import com.dsh.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.models.auth.In; |
| | |
| | | private IStoreService storeService; |
| | | @Autowired |
| | | private CompetitionClient competitionClient; |
| | | @Autowired |
| | | private ICityService cityService; |
| | | |
| | | @RequestMapping("download") |
| | | public void down(HttpServletRequest request, HttpServletResponse response) throws IOException { |
| | |
| | | public String index(Model model) { |
| | | Integer objectType = UserExt.getUser().getObjectType(); |
| | | model.addAttribute("objectType",objectType); |
| | | List<TCity> list = cityService.list(new LambdaQueryWrapper<TCity>().eq(TCity::getParentId, 0)); |
| | | model.addAttribute("list",list); |
| | | return PREFIX + "tStudent.html"; |
| | | } |
| | | |
| | |
| | | |
| | | @TableField(exist = false) |
| | | private Integer type; |
| | | @TableField("addType") |
| | | private Integer addType; |
| | | } |
| | |
| | | <div class="row btn-group-m-t"> |
| | | <div class="col-sm-10 col-sm-offset-5"> |
| | | <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="TCompetition.close()"/> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCompetition.addSubmit3()"/> |
| | | <#button btnCss="info" name="保存" id="ensure" icon="fa-check" clickFun="TCompetition.addSubmit9()"/> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div class="col-sm-12"> |
| | | <div class="row"> |
| | | @if(objectType ==1){ |
| | | |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="province" name="省份" /> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在省 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="pCode" onchange="TCompetition.oneChange(this)"> |
| | | <option value="">全部</option> |
| | | @for(obj in list){ |
| | | <option value="${obj.code}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#NameCon id="city" name="城市" /> |
| | | <div class="input-group"> |
| | | <div class="input-group-btn open"> |
| | | <button data-toggle="dropdown" class="btn btn-white dropdown-toggle" type="button" aria-expanded="true"> |
| | | 所在市 |
| | | </button> |
| | | </div> |
| | | <select class="form-control" id="cCode"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | @} |
| | | <div class="col-sm-3"> |
| | |
| | | </div> |
| | | <div class="col-sm-3"> |
| | | <#button name="搜索" icon="fa-search" clickFun="TStudent.search()"/> |
| | | <#button name="重置" icon="fa-trash" clickFun="TStudent.resetSearch()" space="true"/> |
| | | </div> |
| | | </div> |
| | | <div class="hidden-xs" id="TStudentTableToolbar" role="group"> |
| | |
| | | </div> |
| | | </div> |
| | | <script src="${ctxPath}/modular/system/tStudent/tStudent.js"></script> |
| | | <script src="${ctxPath}/modular/system/tShop/tShop.js"></script> |
| | | <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.4.0/jspdf.umd.min.js"> |
| | | </script> |
| | | <script> |
| | |
| | | }, |
| | | { |
| | | "type": "tpl", |
| | | "tpl": "        体测表:", |
| | | "tpl": "        体测表:请上传长图    推荐像素:宽度780px", |
| | | "inline": true, |
| | | "wrapperComponent": "", |
| | | "id": "u:8224ab367da8" |
| | |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var elementById = document.getElementById("pt"); |
| | | |
| | | var operatorId; |
| | | if (elementById.checked){ |
| | | operatorId = 0 |
| | | }else{ |
| | | if (elementById !== null) { |
| | | console.log(elementById) |
| | | operatorId = $("#account").val() |
| | | if (elementById.checked){ |
| | | operatorId = 0 |
| | | }else{ |
| | | operatorId = $("#account").val() |
| | | } |
| | | } |
| | | |
| | | |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/getCityYys", function(data){ |
| | | if(data!=null){ |
| | |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | |
| | | |
| | | |
| | | var pCode = $("#pCode").val(); |
| | | if(pCode==""){ |
| | | Feng.info("请选择省"); |
| | |
| | | }, |
| | | {title: '操作', visible: role==1?true:false, align: 'center', valign: 'middle', |
| | | formatter:function (value,row) { |
| | | return '<a href="javascript:void(0);" style="color: blue" onclick="TCompetition.delete1(' + row.id +')">删除 </a> <a href="javascript:void(0);" style="color: blue" onclick="TCompetition.openTCompetitionDetail(' + row.id +')">编辑</a>' |
| | | return '<a href="javascript:void(0);" style="color: blue" ' + |
| | | 'onclick="TCompetition.delete1(' + row.id +')">删除 </a> ' + |
| | | '<a href="javascript:void(0);" style="color: blue" ' + |
| | | 'onclick="TCompetition.openTCompetitionDetail(' + row.id +')">编辑</a>' |
| | | } |
| | | }, |
| | | ]; |
| | |
| | | window.parent.TCompetition.table.refresh(); |
| | | parent.layer.close(window.parent.TCompetition.layerIndex); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | Feng.error("添加失败"); |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | Feng.error("添加失败!" ); |
| | | }); |
| | | ajax.set("url",url); |
| | | ajax.set("name",name); |
| | | ajax.set("page",page); |
| | | ajax.set("type",type); |
| | | ajax.set("turnId",turnId); |
| | | ajax.set("sort",sort); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.start(); |
| | | } |
| | | TCompetition.addSubmit9 = function() { |
| | | |
| | | let url = $("#url").val() |
| | | if(url==''){ |
| | | } |
| | | |
| | | let name = $("#name").val() |
| | | console.log(name) |
| | | |
| | | if(name=='' || name ==null){ |
| | | Feng.info("请选择跳转模块") |
| | | return; |
| | | } |
| | | let page = $("#page").val() |
| | | if(page=='' && name !='不跳转'){ |
| | | Feng.info("请选择跳转页面") |
| | | return; |
| | | } |
| | | let type = $("#type").val() |
| | | |
| | | if(type=='' && name !='不跳转'){ |
| | | } |
| | | let turnId = $("#turnId").val() |
| | | |
| | | // if( type =='11' || type=='13'|| type=='16'|| type=='19'|| type=='21'|| type=='40'|| type=='43'){ |
| | | // if(turnId==""){ |
| | | // Feng.info("请输入跳转ID") |
| | | // return; |
| | | // } |
| | | // } |
| | | if ($('#type option:selected').text() == "详情"&&$('#type option:selected').text() == "指定商品"&&$('#type option:selected').text() == "指定折扣") { |
| | | if ($("#turnId").val() == '') { |
| | | Feng.info("请输入跳转ID") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | let sort = $("#sort").val() |
| | | |
| | | if(sort==''){ |
| | | Feng.info("请输入排序") |
| | | return; |
| | | } |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/addConfigOne9", function(data){ |
| | | if(data.code == 200){ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TCompetition.table.refresh(); |
| | | parent.layer.close(window.parent.TCompetition.layerIndex); |
| | | }else{ |
| | | Feng.error("添加失败"); |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" ); |
| | | }); |
| | | ajax.set("url",url); |
| | | ajax.set("name",name); |
| | |
| | | window.parent.TCompetition.table.refresh(); |
| | | parent.layer.close(window.parent.TCompetition.layerIndex); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | Feng.error("添加失败"); |
| | | } |
| | | |
| | | },function(data){ |
| | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | var elementById = document.getElementById("radio1"); |
| | | if (elementById.checked) { |
| | | if (pCode == '' && $("#role").val() == "1") { |
| | | Feng.info("请选择省") |
| | | return; |
| | | if (elementById != null){ |
| | | if (elementById.checked) { |
| | | if (pCode == '' && $("#role").val() == "1") { |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if (cCode == '' && $("#role").val() == "1") { |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | } |
| | | if (cCode == '' && $("#role").val() == "1") { |
| | | Feng.info("请选择市") |
| | | return; |
| | | if (!elementById.checked){ |
| | | if(pCode1=='' && $("#role").val()=="1"){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode1=='' && $("#role").val()=="1"){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!elementById.checked){ |
| | | if(pCode1=='' && $("#role").val()=="1"){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode1=='' && $("#role").val()=="1"){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | if(name==''){ |
| | | Feng.info("门店名称不能为空") |
| | | return; |
| | |
| | | */ |
| | | TStudent.search = function () { |
| | | var queryData = {}; |
| | | queryData['province'] = $("#province").val(); |
| | | queryData['city'] = $("#city").val(); |
| | | queryData['province'] = $("#pCode").val(); |
| | | queryData['city'] = $("#cCode").val(); |
| | | queryData['name'] = $("#name").val(); |
| | | queryData['userName'] = $("#userName").val(); |
| | | queryData['phone'] = $("#phone").val(); |
| | | |
| | | |
| | | TStudent.table.refresh({query: queryData}); |
| | | }; |
| | | TStudent.resetSearch = function () { |
| | | $("#pCode").val(""); |
| | | $("#cCode").val(""); |
| | | $("#name").val(""); |
| | | $("#userName").val(""); |
| | | $("#phone").val(""); |
| | | TStudent.search(); |
| | | }; |
| | | TStudent.editCoursePackageState = function (state) { |
| | | if (this.check()) { |
| | | |
| | |
| | | private List<Integer> sid; |
| | | @TableField(exist = false) |
| | | private List<Integer> rid; |
| | | @TableField("addType") |
| | | private Integer addType; |
| | | } |