| | |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.Brand; |
| | | import com.doumee.service.business.BrandService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | return ApiResponse.success(baseCategory); |
| | | } |
| | | |
| | | @ApiOperation("å表 - SaaSH5") |
| | | @PostMapping("/saasList") |
| | | public ApiResponse<List<Category>> saasList (@RequestBody Category category) { |
| | | return ApiResponse.success(categoryService.findListSaaS(category)); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.doumee.dao.business.model.dto.GoodsRequest; |
| | | import com.doumee.service.business.GoodsService; |
| | | import io.swagger.annotations.*; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @ApiOperation("å表 - H5") |
| | | @PostMapping("/list") |
| | | public ApiResponse<List<Goods>> findList (@RequestBody Goods goods) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | goods.setCompanyId(user.getCompanyId()); |
| | | return ApiResponse.success(goodsService.findList(goods)); |
| | | } |
| | | |
| | |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.dao.system.dto.LoginDTO; |
| | | import com.doumee.dao.system.dto.UpdatePwdDto; |
| | | import com.doumee.dao.system.dto.WebLoginDTO; |
| | | import com.doumee.service.system.SystemLoginService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.apache.shiro.subject.Subject; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | private SystemLoginService systemLoginService; |
| | | |
| | | @PreventRepeat(limit = 10, lockTime = 10000) |
| | | @ApiOperation("ç»å½") |
| | | @ApiOperation("ç»å½ - å端") |
| | | @PostMapping("/login") |
| | | public ApiResponse<String> login (@Validated @RequestBody LoginDTO dto, HttpServletRequest request) { |
| | | return ApiResponse.success(systemLoginService.loginByPassword(dto, Constants.ONE, request)); |
| | | } |
| | | |
| | | @PreventRepeat(limit = 10, lockTime = 10000) |
| | | @ApiOperation("ç»å½ - H5") |
| | | @PostMapping("/loginH5") |
| | | public ApiResponse<String> loginH5 (@Validated @RequestBody WebLoginDTO dto, HttpServletRequest request) { |
| | | LoginDTO loginDTO = new LoginDTO(); |
| | | BeanUtils.copyProperties(dto,loginDTO); |
| | | return ApiResponse.success(systemLoginService.loginByPassword(loginDTO, Constants.TWO, request)); |
| | | } |
| | | |
| | | @ApiOperation("éåºç»å½") |
| | | @PostMapping("/logout") |
| | | public ApiResponse logout () { |
| | |
| | | Map<String, String> map = new LinkedHashMap<>(); |
| | | // è·¯å¾æ¦æªé
ç½® |
| | | // è·¯å¾æ¦æªé
ç½® |
| | | // map.put("/system/dictData/companyUserRules","anon"); |
| | | // map.put("/system/login", "anon"); |
| | | // map.put("/system/logout", "anon"); |
| | | // map.put("/common/captcha", "anon"); |
| | | // map.put("/business/areas/*", "anon"); |
| | | // map.put("/public/uploadPicture","anon"); |
| | | // map.put("/public/uploadLocal","anon"); |
| | | |
| | | map.put("/system/dictData/companyUserRules","anon"); |
| | | map.put("/system/login", "anon"); |
| | | map.put("/system/logout", "anon"); |
| | | map.put("/system/loginH5", "anon"); |
| | | map.put("/common/captcha", "anon"); |
| | | map.put("/business/areas/*", "anon"); |
| | | map.put("/public/uploadPicture","anon"); |
| | | map.put("/public/uploadLocal","anon"); |
| | | |
| | | |
| | | map.put("/business/company/register", "anon"); |
| | | map.put("/business/labels/page","anon"); |
| | | map.put("/business/*/list","anon"); |
| | | map.put("/business/goods/goodsPage","anon"); |
| | | map.put("/business/goods/h5Image","anon"); |
| | | map.put("/business/goods/export","anon"); |
| | | map.put("/business/goods/listForH5","anon"); |
| | | |
| | | |
| | | // - æ¾è¡swagger |
| | | map.put("/doc.html", "anon"); |
| | | map.put("/webjars/**", "anon"); |
| | |
| | | map.put("/system/dictData/companyUserRules","anon"); |
| | | map.put("/system/login", "anon"); |
| | | map.put("/system/logout", "anon"); |
| | | map.put("/system/loginH5", "anon"); |
| | | map.put("/common/captcha", "anon"); |
| | | map.put("/business/areas/*", "anon"); |
| | | map.put("/public/uploadPicture","anon"); |
| | |
| | | map.put("/system/dictData/companyUserRules","anon"); |
| | | map.put("/system/login", "anon"); |
| | | map.put("/system/logout", "anon"); |
| | | map.put("/system/loginH5", "anon"); |
| | | map.put("/common/captcha", "anon"); |
| | | map.put("/business/areas/*", "anon"); |
| | | map.put("/business/company/register", "anon"); |
| | |
| | | public static final String ENDPOINT = "ENDPOINT"; |
| | | public static final String RESOURCE_PATH = "RESOURCE_PATH"; |
| | | public static final String WEB_PARAM = "WEB_PARAM"; |
| | | public static final String MAIN_COLOR = "MAIN_COLOR"; |
| | | public static final String BG_IMG = "BG_IMG"; |
| | | public static final String TOP_IMG = "TOP_IMG"; |
| | | public static final String PK_IMG = "PK_IMG"; |
| | | public static final String RANGE_SIZE = "RANGE_SIZE"; |
| | | |
| | | |
| | | public static final String SYSTEM ="SYSTEM"; |
| | |
| | | @TableField(exist = false) |
| | | private List<CateParam> paramList; |
| | | |
| | | @ApiModelProperty(value = "屿§1 å表å¼") |
| | | @ApiModelProperty(value = "屿§1 å表å¼" ,hidden = true) |
| | | @TableField(exist = false) |
| | | private List<CateAttr> attrFirstList; |
| | | |
| | | @ApiModelProperty(value = "屿§2 å表å¼") |
| | | @ApiModelProperty(value = "屿§2 å表å¼" ,hidden = true) |
| | | @TableField(exist = false) |
| | | private List<CateAttr> attrSecondList; |
| | | |
| | |
| | | @TableField(exist = false) |
| | | private List<CateBudget> budgetList; |
| | | |
| | | @ApiModelProperty(value = "屿§1 å表å¼") |
| | | @TableField(exist = false) |
| | | private List<CateParamSelect> cateParamFirstList; |
| | | |
| | | @ApiModelProperty(value = "屿§2 å表å¼") |
| | | @TableField(exist = false) |
| | | private List<CateParamSelect> cateParamSecondList; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.system.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * @author Eva.Caesar Liu |
| | | * @date 2023/02/14 11:14 |
| | | */ |
| | | @Data |
| | | @ApiModel("H5主æç»å½åæ°") |
| | | public class WebLoginDTO implements Serializable { |
| | | |
| | | @NotBlank(message = "ç¨æ·åä¸è½ä¸ºç©º") |
| | | @ApiModelProperty(value = "ç¨æ·å") |
| | | private String username; |
| | | |
| | | @NotBlank(message = "å¯ç ä¸è½ä¸ºç©º") |
| | | @ApiModelProperty(value = "å¯ç ") |
| | | private String password; |
| | | |
| | | } |
| | |
| | | */ |
| | | List<Category> findList(Category category); |
| | | |
| | | List<Category> findListSaaS(Category category); |
| | | |
| | | List<Category> companyFindList(Category category); |
| | | /** |
| | | * æ¥è¯¢ç±»å« |
| | |
| | | if (Objects.isNull(user.getCompanyId())) { |
| | | wrapper.lambda().eq(Brand::getType,Constants.ONE); |
| | | }else { |
| | | wrapper.lambda().eq(Brand::getCompanyId,brand.getCompanyId()) |
| | | .or().eq(Brand::getType,Constants.ZERO); |
| | | wrapper.lambda().and(i->i.eq(Brand::getCompanyId,user.getCompanyId()) |
| | | .or().eq(Brand::getType,Constants.ZERO) |
| | | ); |
| | | } |
| | | List<Brand> list = brandMapper.selectList(wrapper); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() |
| | |
| | | if (Objects.isNull(user.getCompanyId())) { |
| | | queryWrapper.lambda().eq(Brand::getType,Constants.ONE); |
| | | }else { |
| | | queryWrapper.lambda().and(wreapper->{ |
| | | wreapper.eq(Brand::getType,pageWrap.getModel().getCompanyId()) |
| | | .or().eq(Brand::getType,Constants.ZERO);}); |
| | | |
| | | queryWrapper.lambda().and(i->i.eq(Brand::getCompanyId,user.getCompanyId()) |
| | | .or().eq(Brand::getType,Constants.ZERO) |
| | | ); |
| | | } |
| | | queryWrapper.lambda().orderByAsc(Brand::getSortnum); |
| | | IPage<Brand> brandIPage = brandMapper.selectPage(page, queryWrapper); |
| | |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.CateAttrMapper; |
| | | import com.doumee.dao.business.CateParamMapper; |
| | | import com.doumee.dao.business.CateParamSelectMapper; |
| | | import com.doumee.dao.business.CategoryMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.CategoryService; |
| | |
| | | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private CateParamSelectMapper cateParamSelectMapper; |
| | | |
| | | @Override |
| | | public Integer create(Category category) { |
| | |
| | | |
| | | @Override |
| | | public List<Category> findList(Category category) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | QueryWrapper<Category> wrapper = new QueryWrapper<>(category) |
| | | .eq("STATUS",Constants.ZERO) |
| | | .eq("ISDELETED",Constants.ZERO) |
| | | .eq("COMPANY_ID",user.getCompanyId()) |
| | | .orderByAsc(" SORTNUM "); |
| | | List<Category> list = categoryMapper.selectList(wrapper); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.FILE_DIR).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.PROJECTS).getCode(); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.OSS, Constants.FILE_DIR).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.OSS, Constants.CATEGORY_IMG).getCode(); |
| | | for (Category c:list) { |
| | | c.setPrefixUrl(prefixUrl); |
| | | c.setAttrFirstList(cateAttrMapper.selectList(new QueryWrapper<CateAttr>().eq("TYPE",Constants.ZERO).eq("ISDELETED",Constants.ZERO).eq("CATEGORY_ID",c.getId()).orderByAsc(" SORTNUM "))); |
| | |
| | | return list; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<Category> findListSaaS(Category category) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(!user.getType().equals(Constants.UserType.ZHUBO.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ç¨æ·ç±»å«é误ï¼é主æç¨æ·!"); |
| | | } |
| | | QueryWrapper<Category> wrapper = new QueryWrapper<>(category) |
| | | .eq("STATUS",Constants.ZERO) |
| | | .eq("ISDELETED",Constants.ZERO) |
| | | .eq("COMPANY_ID",user.getCompanyId()) |
| | | .orderByAsc(" SORTNUM "); |
| | | List<Category> list = categoryMapper.selectList(wrapper); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.OSS, Constants.FILE_DIR).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.OSS, Constants.CATEGORY_IMG).getCode(); |
| | | for (Category c:list) { |
| | | c.setPrefixUrl(prefixUrl); |
| | | // c.setAttrFirstList(cateAttrMapper.selectList(new QueryWrapper<CateAttr>().eq("TYPE",Constants.ZERO).eq("ISDELETED",Constants.ZERO).eq("CATEGORY_ID",c.getId()).orderByAsc(" SORTNUM "))); |
| | | // c.setAttrSecondList(cateAttrMapper.selectList(new QueryWrapper<CateAttr>().eq("TYPE",Constants.ONE).eq("ISDELETED",Constants.ZERO).eq("CATEGORY_ID",c.getId()).orderByAsc(" SORTNUM "))); |
| | | c.setBudgetList(cateBudgetMapper.selectList(new QueryWrapper<CateBudget>().eq("CATEGORY_ID",c.getId()).orderByAsc(" SORTNUM "))); |
| | | this.getParamSelect(c); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | |
| | | public void getParamSelect(Category category){ |
| | | List<CateParam> cateParamList = cateParamMapper.selectList(new QueryWrapper<CateParam>() |
| | | .eq("CATEGORY_ID",category.getId()) |
| | | .eq("ISSELECT",Constants.ONE) |
| | | .eq("ISDELETED",Constants.ZERO) |
| | | .orderByAsc(" SORTNUM ") |
| | | .last(" limit 2 ") |
| | | ); |
| | | if(!Objects.isNull(cateParamList)&&cateParamList.size()>Constants.ZERO){ |
| | | for (int i = 0; i < cateParamList.size(); i++) { |
| | | CateParam cateParam = cateParamList.get(i); |
| | | List<CateParamSelect> cateParamSelectList = cateParamSelectMapper.selectList(new QueryWrapper<CateParamSelect>() |
| | | .eq("PARAM_ID",cateParam.getId()) |
| | | .eq("ISDELETED",Constants.ZERO)); |
| | | if(i==0){ |
| | | category.setAttrFirst(cateParam.getName()); |
| | | category.setCateParamFirstList(cateParamSelectList); |
| | | }else if(i==1){ |
| | | category.setAttrSecond(cateParam.getName()); |
| | | category.setCateParamSecondList(cateParamSelectList); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public List<Category> findListForGoods(Integer goodsId) { |
| | | QueryWrapper<Category> wrapper = new QueryWrapper<Category>() |
| | |
| | | .eq("ISDELETED",Constants.ZERO) |
| | | .orderByAsc(" SORTNUM "); |
| | | List<Category> list = categoryMapper.selectList(wrapper); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.FILE_DIR).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.PROJECTS).getCode(); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.OSS, Constants.FILE_DIR).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.OSS, Constants.CATEGORY_IMG).getCode(); |
| | | for (Category c:list) { |
| | | c.setPrefixUrl(prefixUrl); |
| | | c.setAttrFirstList(cateAttrMapper.selectList(new QueryWrapper<CateAttr>().eq("TYPE",Constants.ZERO).eq("ISDELETED",Constants.ZERO).eq("CATEGORY_ID",c.getId()).orderByAsc(" SORTNUM "))); |
| | |
| | | .eq("ISDELETED",Constants.ZERO) |
| | | .orderByAsc(" SORTNUM "); |
| | | List<Category> list = categoryMapper.selectList(wrapper); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.FILE_DIR).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.PROJECTS).getCode(); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.OSS, Constants.FILE_DIR).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.OSS, Constants.CATEGORY_IMG).getCode(); |
| | | for (Category c:list) { |
| | | c.setPrefixUrl(prefixUrl); |
| | | c.setBudgetList(cateBudgetMapper.selectList(new QueryWrapper<CateBudget>().eq("STATUS",Constants.ZERO).eq("CATEGORY_ID",c.getId()).orderByAsc(" SORTNUM "))); |
| | |
| | | import com.doumee.dao.business.model.dto.PlatGoodsParam; |
| | | import com.doumee.service.business.GoodsService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.java.Log; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.ss.usermodel.*; |
| | | import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
| | |
| | | @Override |
| | | public void export(HttpServletRequest request, HttpServletResponse response) throws Exception { |
| | | try { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | String fileName = "产å导å
¥è¡¨"+System.currentTimeMillis()+".xlsx"; |
| | | // è·åæä»¶è¾å
¥æµ |
| | | InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("static/file/goodsExcelTemp.xlsx"); |
| | |
| | | // sheet.getPhysicalNumberOfRows()è·åæ»çè¡æ° |
| | | // 循ç¯è¯»åæ¯ä¸è¡ |
| | | Row row = sheet.createRow(1); |
| | | List<Category> categoryList = categoryMapper.selectList(new QueryWrapper<Category>().eq("ISDELETED",0)); |
| | | List<Category> categoryList = categoryMapper.selectList( |
| | | new QueryWrapper<Category>().eq("ISDELETED",0) |
| | | .eq("COMPANY_ID",loginUserInfo.getCompanyId()) |
| | | ); |
| | | categoryList.forEach(i->{ |
| | | i.setParamList(cateParamMapper.selectList(new QueryWrapper<CateParam>().eq("ISDELETED",0).eq("CATEGORY_ID",i.getId()))); |
| | | }); |
| | |
| | | .apply(!Objects.isNull(pageWrap.getModel()) && !Objects.isNull(pageWrap.getModel().getEPrice()), " t.PRICE <= "+pageWrap.getModel().getEPrice()+" "); |
| | | queryWrapper.orderByDesc(Goods::getId); |
| | | IPage<Goods> goodsIPage = goodsJoinMapper.selectJoinPage(page, Goods.class, queryWrapper); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.FILE_DIR).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.PROJECTS).getCode(); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.OSS, Constants.GOODS_IMG).getCode(); |
| | | goodsIPage.getRecords().forEach(i->{ |
| | | i.setPrefixUrl(prefixUrl); |
| | | i.setMultifileList(multifileMapper.selectList(new QueryWrapper<Multifile>().eq("OBJ_ID",i.getId()).orderByAsc(" SORTNUM "))); |
| | |
| | | |
| | | @Override |
| | | public List<Goods> findListForH5(GoodsRequest goodsRequest) { |
| | | LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(!loginUserInfo.getType().equals(Constants.UserType.ZHUBO.getKey())){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"é主æç¨æ·æ æ³ä½¿ç¨"); |
| | | } |
| | | MPJLambdaWrapper<Goods> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(Goods.class); |
| | | queryWrapper.selectAs(Category::getName, Goods::getCategoryName); |
| | |
| | | queryWrapper.leftJoin(Brand.class, Brand::getId, Goods::getBrandId); |
| | | queryWrapper.eq(Goods::getStatus,Constants.ZERO); |
| | | queryWrapper.eq(Goods::getIsdeleted,Constants.ZERO); |
| | | queryWrapper.eq(Goods::getCompanyId,loginUserInfo.getCompanyId()); |
| | | queryWrapper.eq(!Objects.isNull(goodsRequest) && !Objects.isNull(goodsRequest.getCategoryId()), Goods::getCategoryId, goodsRequest.getCategoryId()) |
| | | .eq(!Objects.isNull(goodsRequest) && !Objects.isNull(goodsRequest.getBrandId()), Goods::getBrandId, goodsRequest.getBrandId()) |
| | | .and(!Objects.isNull(goodsRequest) && StringUtils.isNotBlank(goodsRequest.getKeyword()), |
| | |
| | | .apply(!Objects.isNull(goodsRequest) && !Objects.isNull(goodsRequest.getEPrice()), " t.PRICE <= "+goodsRequest.getEPrice()+" "); |
| | | queryWrapper.orderByDesc(Goods::getId); |
| | | List<Goods> goodsList = goodsJoinMapper.selectJoinList(Goods.class,queryWrapper); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.FILE_DIR).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.PROJECTS).getCode(); |
| | | String prefixUrl = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.OSS, Constants.GOODS_IMG).getCode(); |
| | | goodsList.forEach(i->{ |
| | | i.setPrefixUrl(prefixUrl); |
| | | i.setMultifileList(multifileMapper.selectList(new QueryWrapper<Multifile>().eq("OBJ_ID",i.getId()).orderByAsc(" SORTNUM "))); |
| | |
| | | if(!Objects.isNull(webParam)){ |
| | | webParam.setResourcePath(systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.WEB_PARAM).getCode()); |
| | | }else{ |
| | | webParam = new WebParam(); |
| | | webParam.setResourcePath(systemDictDataBiz.queryByCode(Constants.OSS,Constants.RESOURCE_PATH).getCode() + |
| | | systemDictDataBiz.queryByCode(Constants.OSS,Constants.WEB_PARAM).getCode()); |
| | | webParam.setBgImg(systemDictDataBiz.queryByCode(Constants.WEB_PARAM,Constants.BG_IMG).getCode()); |
| | | webParam.setTopImg(systemDictDataBiz.queryByCode(Constants.WEB_PARAM,Constants.TOP_IMG).getCode()); |
| | | webParam.setPkImg(systemDictDataBiz.queryByCode(Constants.WEB_PARAM,Constants.PK_IMG).getCode()); |
| | | webParam.setMainColor(systemDictDataBiz.queryByCode(Constants.WEB_PARAM,Constants.MAIN_COLOR).getCode()); |
| | | webParam.setRangeSize(systemDictDataBiz.queryByCode(Constants.WEB_PARAM,Constants.RANGE_SIZE).getCode()); |
| | | } |
| | | return webParam; |
| | | } |
| | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.system.dto.LoginDTO; |
| | | import com.doumee.dao.system.model.SystemLoginLog; |
| | |
| | | loginLog.setOsInfo(Utils.User_Client.getOS(request)); |
| | | loginLog.setServerIp(Utils.Server.getIP()); |
| | | // æ ¡éªéªè¯ç |
| | | if(type!= Constants.TWO){ |
| | | try { |
| | | if(captchaCheck){ |
| | | captchaService.check(dto.getUuid(), dto.getCode()); |
| | |
| | | systemLoginLogService.create(loginLog); |
| | | throw e; |
| | | } |
| | | } |
| | | // æ ¡éªç¨æ·ååå¯ç |
| | | Subject subject = SecurityUtils.getSubject(); |
| | | UsernamePasswordToken token = new UsernamePasswordToken(dto.getUsername(), dto.getPassword()); |