| | |
| | | package com.jilongda.applet.aspect; |
| | | |
| | | |
| | | import com.jilongda.applet.config.GlobalResultEnum; |
| | | import com.jilongda.applet.model.SecUser; |
| | | import com.jilongda.applet.model.TAppUser; |
| | | import com.jilongda.applet.utils.LoginInfoUtil; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.exception.ServiceException; |
| | | import com.jilongda.common.exception.TokenException; |
| | | import com.jilongda.common.exception.UserException; |
| | | import org.aspectj.lang.annotation.Aspect; |
| | | import org.aspectj.lang.annotation.Before; |
| | | import org.aspectj.lang.annotation.Pointcut; |
| | |
| | | public class StateAspect { |
| | | @Autowired |
| | | private LoginInfoUtil loginInfoUtil; |
| | | @Pointcut("execution(* com.jilongda.applet.controller.*.*(..)) && !execution( * com.jilongda.applet.controller.LoginController.*(..)) && !execution(* com.jilongda.applet.controller.TGoodsController.getConfigById(..))") |
| | | @Pointcut("execution(* com.jilongda.applet.controller.*.*(..)) && !execution( * com.jilongda.applet.controller.LoginController.*(..))") |
| | | public void state(){ |
| | | |
| | | } |
| | |
| | | @Before("state()") |
| | | public void isfrozen(){ |
| | | |
| | | SecUser loginUser = loginInfoUtil.getLoginUser(); |
| | | TAppUser loginUser = loginInfoUtil.getLoginUser(); |
| | | if (loginUser==null){ |
| | | throw new TokenException("当前账号已被删除"); |
| | | } |
| | | |
| | | if (loginUser.getState()){ |
| | | if (loginUser.getStatus()==0){ |
| | | throw new TokenException("账号已冻结"); |
| | | } |
| | | |
| | |
| | | package com.jilongda.applet.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.jilongda.applet.model.TLineUp; |
| | | import com.jilongda.applet.service.TLineUpService; |
| | | import com.jilongda.applet.utils.LoginInfoUtil; |
| | | import com.jilongda.applet.vo.TLineUpVO; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.constants.WarehousingConstant; |
| | | import com.jilongda.common.security.JwtTokenUtils; |
| | | import com.jilongda.common.utils.CodeGenerateUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Api(tags = "排号管理") |
| | | @RestController |
| | | @RequestMapping("/t-line-up") |
| | | public class TLineUpController { |
| | | |
| | | @Autowired |
| | | private TLineUpService tLineUpService; |
| | | @Autowired |
| | | private LoginInfoUtil loginInfoUtil; |
| | | |
| | | @ApiOperation(value = "排号管理待验光人数") |
| | | @GetMapping(value = "/getLineUpByStoreId") |
| | | public ApiResult getLineUpByStoreId(@RequestParam Integer storeId) { |
| | | return ApiResult.success(tLineUpService.count(Wrappers.lambdaQuery(TLineUp.class) |
| | | .eq(TLineUp::getStoreId, storeId) |
| | | .eq(TLineUp::getStatus, 1) |
| | | .likeRight(TLineUp::getCreateTime, LocalDate.now()))); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加排号管理") |
| | | @PostMapping(value = "/add") |
| | | public ApiResult add(@Validated @RequestBody TLineUp dto) { |
| | | // 获取当天该门店的排号 |
| | | long count = tLineUpService.count(Wrappers.lambdaQuery(TLineUp.class) |
| | | .eq(TLineUp::getStoreId, dto.getStoreId())); |
| | | dto.setStatus(1); |
| | | dto.setUserId(loginInfoUtil.getUserId()); |
| | | dto.setCode(String.valueOf(count+1)); |
| | | tLineUpService.save(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询当前用户排号信息") |
| | | @GetMapping(value = "/getUserLineUpByStoreId") |
| | | public ApiResult getUserLineUpByStoreId(@RequestParam Integer storeId) { |
| | | long userId = loginInfoUtil.getUserId(); |
| | | TLineUp lineUp = tLineUpService.getOne(Wrappers.lambdaQuery(TLineUp.class) |
| | | .eq(TLineUp::getUserId, userId) |
| | | .eq(TLineUp::getStoreId, storeId) |
| | | .likeRight(TLineUp::getCreateTime, LocalDate.now()) |
| | | .last("LIMIT 1")); |
| | | TLineUpVO tLineUpVO = new TLineUpVO(); |
| | | BeanUtils.copyProperties(lineUp, tLineUpVO); |
| | | |
| | | long count = tLineUpService.count(Wrappers.lambdaQuery(TLineUp.class) |
| | | .eq(TLineUp::getStoreId, storeId) |
| | | .eq(TLineUp::getStatus, 1) |
| | | .lt(TLineUp::getCode, lineUp.getCode()) |
| | | .likeRight(TLineUp::getCreateTime, LocalDate.now())); |
| | | tLineUpVO.setLinUpCount(count); |
| | | return ApiResult.success(tLineUpVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "取消排号") |
| | | @GetMapping(value = "/cancelLineUp") |
| | | public ApiResult cancelLineUp(@RequestParam Integer id) { |
| | | TLineUp lineUp = tLineUpService.getById(id); |
| | | lineUp.setStatus(5); |
| | | tLineUpService.updateById(lineUp); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.jilongda.applet.controller; |
| | | |
| | | |
| | | import com.jilongda.applet.query.TStoreQuery; |
| | | import com.jilongda.applet.service.TStoreService; |
| | | import com.jilongda.applet.vo.TStoreVO; |
| | | import com.jilongda.common.basic.ApiResult; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | |
| | | @Autowired |
| | | private TStoreService tStoreService; |
| | | |
| | | |
| | | /** |
| | | * 获取门店列表 |
| | | */ |
| | | @ApiOperation(value = "获取门店分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TStoreVO>> pageList(@RequestBody TStoreQuery query) { |
| | | return ApiResult.success(tStoreService.pageList(query)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.jilongda.applet.dto; |
| | | |
| | | |
| | | import com.jilongda.applet.model.SecResources; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | package com.jilongda.applet.dto; |
| | | |
| | | import com.jilongda.applet.model.SecRole; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | package com.jilongda.applet.dto; |
| | | |
| | | |
| | | import com.jilongda.applet.model.SecUser; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | |
| | | import com.jilongda.applet.model.TStore; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.applet.query.TStoreQuery; |
| | | import com.jilongda.applet.vo.TStoreVO; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TStoreMapper extends BaseMapper<TStore> { |
| | | |
| | | List<TStoreVO> pageList(@Param("query")TStoreQuery query, @Param("pageInfo")PageInfo<TStoreVO> pageInfo); |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("sec_fee_items") |
| | | @ApiModel(value="SecFeeItems对象", description="系统设置-收费项设置 ") |
| | | public class SecFeeItems implements Serializable { |
| | | public class SecFeeItems extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "状态 1启用 2禁用") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("sec_setting") |
| | | @ApiModel(value="SecSetting对象", description="系统设置 ") |
| | | public class SecSetting implements Serializable { |
| | | public class SecSetting extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "镜架警告阈值") |
| | | @TableField("frameThreshold") |
| | | private Integer frameThreshold; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_brand") |
| | | @ApiModel(value="TBrand对象", description="镜架/镜片品牌表") |
| | | public class TBrand implements Serializable { |
| | | public class TBrand extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "状态 1启用 2禁用") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | @ApiModelProperty(value = "是否为主要品牌 1是2否") |
| | | @TableField("isMain") |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_coupon") |
| | | @ApiModel(value="TCoupon对象", description="优惠券领取记录") |
| | | public class TCoupon implements Serializable { |
| | | public class TCoupon extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "优惠条件金额 为0则表示通用券") |
| | | @TableField("amountCondition") |
| | | private BigDecimal amountCondition; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | @ApiModelProperty(value = "发放状态1发放中 2暂停发放 只有发放方式为1和4的时候存储") |
| | | @TableField("grantStatus") |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_coupon_receive") |
| | | @ApiModel(value="TCouponReceive对象", description="优惠券") |
| | | public class TCouponReceive implements Serializable { |
| | | public class TCouponReceive extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "1待使用 2已使用 3已过期") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_frame_warehousing_detail") |
| | | @ApiModel(value="TFrameWarehousingDetail对象", description="镜架出库入库详细表") |
| | | public class TFrameWarehousingDetail implements Serializable { |
| | | public class TFrameWarehousingDetail extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "入库编号") |
| | | @TableField("code") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | @ApiModelProperty(value = "型号id") |
| | | @TableField("modelId") |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_inventory") |
| | | @ApiModel(value="TInventory对象", description="盘点表") |
| | | public class TInventory implements Serializable { |
| | | public class TInventory extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "备注") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_inventory_frame_detail") |
| | | @ApiModel(value="TInventoryFrameDetail对象", description="材质表") |
| | | public class TInventoryFrameDetail implements Serializable { |
| | | public class TInventoryFrameDetail extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "差值") |
| | | @TableField("diff") |
| | | private Integer diff; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_inventory_lens_detail") |
| | | @ApiModel(value="TInventoryLensDetail对象", description="镜架盘点详细表") |
| | | public class TInventoryLensDetail implements Serializable { |
| | | public class TInventoryLensDetail extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "盘点类型 1球/柱镜2折射率3系列") |
| | | @TableField("category") |
| | | private Integer category; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_lens_series") |
| | | @ApiModel(value="TLensSeries对象", description="镜片系列表") |
| | | public class TLensSeries implements Serializable { |
| | | public class TLensSeries extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "双非") |
| | | @TableField("doubleNon") |
| | | private String doubleNon; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_lens_warehousing_detail") |
| | | @ApiModel(value="TLensWarehousingDetail对象", description="镜片出库入库明细表") |
| | | public class TLensWarehousingDetail implements Serializable { |
| | | public class TLensWarehousingDetail extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "入库/出库数量") |
| | | @TableField("total") |
| | | private Integer total; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | @ApiModelProperty(value = "在库数量(出库没有该字段)") |
| | | @TableField("count") |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_line_up") |
| | | @ApiModel(value="TLineUp对象", description="排号管理") |
| | | public class TLineUp implements Serializable { |
| | | public class TLineUp extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | private Integer optometristId; |
| | | |
| | | @ApiModelProperty(value = "门店id") |
| | | @NotNull(message = "门店id不可为空") |
| | | @TableField("storeId") |
| | | private Integer storeId; |
| | | |
| | | @ApiModelProperty(value = "状态1排队中2验光中3已完成4已过号5已取消") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | @ApiModelProperty(value = "姓名") |
| | | @NotBlank(message = "姓名不可为空") |
| | | @TableField("userName") |
| | | private String userName; |
| | | @ApiModelProperty(value = "1=男 2=女") |
| | | @NotNull(message = "性别不可为空") |
| | | @TableField("gender") |
| | | private Integer gender; |
| | | @ApiModelProperty(value = "年龄") |
| | | @NotNull(message = "年龄不可为空") |
| | | @TableField("age") |
| | | private Integer age; |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_material") |
| | | @ApiModel(value="TMaterial对象", description="镜架/镜片品牌表") |
| | | public class TMaterial implements Serializable { |
| | | public class TMaterial extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "状态 1启用 2禁用") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_model") |
| | | @ApiModel(value="TModel对象", description="镜架型号表") |
| | | public class TModel implements Serializable { |
| | | public class TModel extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "状态 1启用 2禁用") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_optometrist") |
| | | @ApiModel(value="TOptometrist对象", description="验光师表") |
| | | public class TOptometrist implements Serializable { |
| | | public class TOptometrist extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "注册时间") |
| | | @TableField("registerTime") |
| | | private LocalDateTime registerTime; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_optometry") |
| | | @ApiModel(value="TOptometry对象", description="验光单") |
| | | public class TOptometry implements Serializable { |
| | | public class TOptometry extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "注册时间") |
| | | @TableField("registerTime") |
| | | private LocalDateTime registerTime; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_optometry_detail") |
| | | @ApiModel(value="TOptometryDetail对象", description="验光单详情") |
| | | public class TOptometryDetail implements Serializable { |
| | | public class TOptometryDetail extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "注册时间") |
| | | @TableField("registerTime") |
| | | private LocalDateTime registerTime; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_order") |
| | | @ApiModel(value="TOrder对象", description="销售订单表") |
| | | public class TOrder implements Serializable { |
| | | public class TOrder extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "折射率") |
| | | @TableField("refractiveIndex") |
| | | private String refractiveIndex; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | @ApiModelProperty(value = "店铺员工id") |
| | | @TableField("sysId") |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_order_accounting") |
| | | @ApiModel(value="TOrderAccounting对象", description="订单核算表") |
| | | public class TOrderAccounting implements Serializable { |
| | | public class TOrderAccounting extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "镜架核算成本价") |
| | | @TableField("frame") |
| | | private BigDecimal frame; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | @ApiModelProperty(value = "手续费") |
| | | @TableField("commission") |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_order_aftersales") |
| | | @ApiModel(value="TOrderAftersales对象", description="订单售后表") |
| | | public class TOrderAftersales implements Serializable { |
| | | public class TOrderAftersales extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "处理结果") |
| | | @TableField("handleResult") |
| | | private String handleResult; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_store") |
| | | @ApiModel(value="TStore对象", description="门店表") |
| | | public class TStore implements Serializable { |
| | | public class TStore extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "地址") |
| | | @TableField("address") |
| | | private Integer address; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | @TableField("lon") |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_supplier") |
| | | @ApiModel(value="TSupplier对象", description="供应商") |
| | | public class TSupplier implements Serializable { |
| | | public class TSupplier extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "状态 1启用 2禁用") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_ticket") |
| | | @ApiModel(value="TTicket对象", description="小票机") |
| | | public class TTicket implements Serializable { |
| | | public class TTicket extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "密钥") |
| | | @TableField("secret") |
| | | private String secret; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.jilongda.common.pojo.BaseModel; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_warehousing") |
| | | @ApiModel(value="TWarehousing对象", description="镜架/镜片出库入库表") |
| | | public class TWarehousing implements Serializable { |
| | | public class TWarehousing extends BaseModel { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @ApiModelProperty(value = "备注") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("createTime") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "修改时间") |
| | | @TableField("updateTime") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @TableField("createBy") |
| | | private String createBy; |
| | | |
| | | @TableField("updateBy") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "是否删除 0否1是") |
| | | @TableField("isDelete") |
| | | private Integer isDelete; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.applet.query; |
| | | |
| | | import com.jilongda.common.pojo.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "门店query") |
| | | public class TStoreQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lon; |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | |
| | | } |
| | |
| | | package com.jilongda.applet.security; |
| | | |
| | | import com.jilongda.applet.model.SecUser; |
| | | import com.jilongda.common.model.TUser; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | package com.jilongda.applet.security; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.jilongda.applet.model.SecUser; |
| | | import com.jilongda.common.utils.SpringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.core.userdetails.UserDetailsService; |
| | |
| | | |
| | | import com.jilongda.applet.model.TStore; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.jilongda.applet.query.TStoreQuery; |
| | | import com.jilongda.applet.vo.TStoreVO; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TStoreService extends IService<TStore> { |
| | | |
| | | /** |
| | | * 分页查询门店列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TStoreVO> pageList(TStoreQuery query); |
| | | |
| | | } |
| | |
| | | |
| | | import com.jilongda.applet.model.TStore; |
| | | import com.jilongda.applet.mapper.TStoreMapper; |
| | | import com.jilongda.applet.query.TStoreQuery; |
| | | import com.jilongda.applet.service.TStoreService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.jilongda.applet.vo.SecUserVO; |
| | | import com.jilongda.applet.vo.TStoreVO; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TStoreServiceImpl extends ServiceImpl<TStoreMapper, TStore> implements TStoreService { |
| | | |
| | | @Override |
| | | public PageInfo<TStoreVO> pageList(TStoreQuery query) { |
| | | PageInfo<TStoreVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TStoreVO> list = this.baseMapper.pageList(query, pageInfo); |
| | | pageInfo.setRecords(list); |
| | | // 获取列表 |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.jilongda.applet.utils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.jilongda.applet.model.SecUser; |
| | | import com.jilongda.applet.model.TAppUser; |
| | | import com.jilongda.applet.service.TAppUserService; |
| | | import com.jilongda.common.model.TUser; |
| | | import com.jilongda.common.security.JwtTokenUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public class LoginInfoUtil { |
| | | |
| | | @Autowired |
| | | private TUserService tUserService; |
| | | |
| | | @Autowired |
| | | private SecUserService secUserService; |
| | | private TAppUserService appUserService; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public Long getUserId1(){ |
| | | public Integer getUserId(){ |
| | | String username = JwtTokenUtils.getUsername(); |
| | | TUser userName = tUserService.getOne(new QueryWrapper<TUser>().eq("userName", username).eq("isDelete",0)); |
| | | return userName.getId(); |
| | | |
| | | } |
| | | public Long getUserId(){ |
| | | String username = JwtTokenUtils.getUsername(); |
| | | SecUser userName = secUserService.getOne(new QueryWrapper<SecUser>().eq("phone", username).eq("isDelete",0)); |
| | | return userName.getId(); |
| | | |
| | | } |
| | | public SecUser getLoginUserByPhone(){ |
| | | String username = JwtTokenUtils.getUsername(); |
| | | SecUser tUser = secUserService.getOne(new QueryWrapper<SecUser>().eq("phone", username).eq("isDelete",0)); |
| | | return tUser; |
| | | TAppUser appUser = appUserService.getOne(new QueryWrapper<TAppUser>().eq("phone", username).eq("isDelete",0)); |
| | | return appUser.getId(); |
| | | } |
| | | |
| | | public SecUser getLoginUser(){ |
| | | public TAppUser getLoginUser(){ |
| | | String username = JwtTokenUtils.getUsername(); |
| | | SecUser secUser = secUserService.getOne(new QueryWrapper<SecUser>().eq("phone", username).eq("isDelete",0)); |
| | | return secUser; |
| | | } |
| | | |
| | | public Integer getUserType(){ |
| | | String username = JwtTokenUtils.getUsername(); |
| | | SecUser userName = secUserService.getOne(new QueryWrapper<SecUser>().eq("phone", username).eq("isDelete",0)); |
| | | return userName.getUserType(); |
| | | |
| | | TAppUser TAppUser = appUserService.getOne(new QueryWrapper<TAppUser>().eq("phone", username).eq("isDelete",0)); |
| | | return TAppUser; |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | public void logoff(){ |
| | | String username = JwtTokenUtils.getUsername(); |
| | | SecUser userName = secUserService.getOne(new QueryWrapper<SecUser>().eq("phone", username).eq("isDelete",0)); |
| | | TAppUser userName = appUserService.getOne(new QueryWrapper<TAppUser>().eq("phone", username).eq("isDelete",0)); |
| | | userName.setIsDelete(true); |
| | | secUserService.saveOrUpdate(userName); |
| | | appUserService.saveOrUpdate(userName); |
| | | } |
| | | |
| | | public Boolean checkPhoneExits(String phone){ |
| | | SecUser userName = secUserService.getOne(new QueryWrapper<SecUser>().eq("phone", phone).eq("isDelete",0)); |
| | | TAppUser userName = appUserService.getOne(new QueryWrapper<TAppUser>().eq("phone", phone).eq("isDelete",0)); |
| | | if(userName!=null){ |
| | | return true; |
| | | }else{ |
| | |
| | | package com.jilongda.applet.vo; |
| | | |
| | | |
| | | import com.jilongda.applet.model.SecResources; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | package com.jilongda.applet.vo; |
| | | |
| | | |
| | | import com.jilongda.applet.model.SecResources; |
| | | import com.jilongda.applet.model.SecRole; |
| | | import com.jilongda.applet.model.SecUser; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | |
| | | package com.jilongda.applet.vo; |
| | | |
| | | |
| | | import com.jilongda.applet.model.SecRole; |
| | | import com.jilongda.applet.model.SecUser; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
New file |
| | |
| | | package com.jilongda.applet.vo; |
| | | |
| | | import com.jilongda.applet.model.TLineUp; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "排号管理VO") |
| | | public class TLineUpVO extends TLineUp { |
| | | |
| | | @ApiModelProperty(value = "排队人数") |
| | | private Long linUpCount; |
| | | |
| | | } |
New file |
| | |
| | | package com.jilongda.applet.vo; |
| | | |
| | | import com.jilongda.applet.model.TStore; |
| | | |
| | | public class TStoreVO extends TStore { |
| | | } |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, name, province, provinceCode, city, cityCode, area, areaCode, address, createTime, updateTime, createBy, updateBy, isDelete, lon, lat, img |
| | | id, `name`, province, provinceCode, city, cityCode, area, areaCode, address, createTime, updateTime, createBy, updateBy, isDelete, lon, lat, img |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.applet.vo.TStoreVO"> |
| | | select id, `name`, province, provinceCode, city, cityCode, area, areaCode, address, createTime, updateTime, |
| | | createBy, updateBy, isDelete, lon, lat, img |
| | | <if test="query.lon != null and query.lon != '' and query.lat != null and query.lat != ''"> |
| | | ,ROUND( |
| | | 6378.138 * 2 * ASIN( |
| | | SQRT( |
| | | POW( |
| | | SIN( |
| | | ( |
| | | #{query.lat} * PI() / 180 - lat * PI() / 180 |
| | | ) / 2 |
| | | ), |
| | | 2 |
| | | ) + COS(#{query.lat} * PI() / 180) * COS(lat * PI() / 180) * POW( |
| | | SIN( |
| | | ( |
| | | #{query.lon} * PI() / 180 - lon * PI() / 180 |
| | | ) / 2 |
| | | ), |
| | | 2 |
| | | ) |
| | | ) |
| | | ) * 1000 |
| | | ) AS distance |
| | | </if> |
| | | from t_store |
| | | where isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | ORDER BY IFNULL(distance,0),createTime DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | * @return |
| | | */ |
| | | public static <T> LoadingCache<String, T> caffineCacheManage(Cache cache) { |
| | | log.info("初始化缓存的实体数据:{}", cache); |
| | | if (Objects.isNull(cache)) { |
| | | throw new NullPointerException("请实例化一个Cache对象!"); |
| | | } |
| | |
| | | .removalListener(new RemovalListener<String, T>() { |
| | | @Override |
| | | public void onRemoval(String key, Object value, RemovalCause cause) { |
| | | log.info(key + ":" + value + ":" + cause.name()); |
| | | } |
| | | }) |
| | | // build里面要实现一个匿名抽象类 |
| | |
| | | final String bucketName = AliOss.bucketName; |
| | | // <yourObjectName>上传文件到OSS时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。 |
| | | String objectName = AliOss.dir + filename; |
| | | log.info(objectName); |
| | | // 创建OSSClient实例。 |
| | | OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); |
| | | // 填写本地文件的完整路径。如果未指定本地路径,则默认从示例程序所属项目对应本地路径中上传文件流。 |
| | | // InputStream inputStream = new FileInputStream("D:\\localpath\\examplefile.txt"); |
| | | // 依次填写Bucket名称(例如examplebucket)和Object完整路径(例如exampledir/exampleobject.txt)。Object完整路径中不能包含Bucket名称。 |
| | | PutObjectResult putObjectResult = ossClient.putObject(bucketName, objectName, inputStream); |
| | | log.info("上传结果:{}", putObjectResult); |
| | | OSSObject ossObject = ossClient.getObject(bucketName, objectName); |
| | | String uri = ossObject.getResponse().getUri(); |
| | | // 关闭OSSClient。 |
| | |
| | | final String bucketName = AliOss.bucketName; |
| | | // <yourObjectName>上传文件到OSS时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。 |
| | | String objectName = AliOss.dir + filename; |
| | | log.info(objectName); |
| | | // 创建OSSClient实例。 |
| | | OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); |
| | | // 填写本地文件的完整路径。如果未指定本地路径,则默认从示例程序所属项目对应本地路径中上传文件流。 |
| | | // InputStream inputStream = new FileInputStream("D:\\localpath\\examplefile.txt"); |
| | | // 依次填写Bucket名称(例如examplebucket)和Object完整路径(例如exampledir/exampleobject.txt)。Object完整路径中不能包含Bucket名称。 |
| | | PutObjectResult putObjectResult = ossClient.putObject(bucketName, objectName, inputStream); |
| | | log.info("上传结果:{}", putObjectResult); |
| | | OSSObject ossObject = ossClient.getObject(bucketName, objectName); |
| | | String uri = ossObject.getResponse().getUri(); |
| | | // 关闭OSSClient。 |
| | |
| | | @ApiOperation(value = "oss回调", notes = "oss回调") |
| | | @PostMapping(value = "/callback") |
| | | public ApiResult callback(@RequestBody Map<String, Object> callback) { |
| | | log.info("oss回调{}", callback); |
| | | String filename = "http://".concat(AliOss.bucketName).concat(".").concat(AliOss.endpoint).concat("/").concat(callback.get("filename").toString()); |
| | | return ApiResult.okmsg(filename); |
| | | } |
| | |
| | | * 售后 |
| | | */ |
| | | public static final String ASTER_SALES = "SH"; |
| | | /** |
| | | * 售后 |
| | | */ |
| | | public static final String LINE_UP = "PH"; |
| | | |
| | | } |
| | |
| | | @PostMapping(value = "/updateList") |
| | | public ApiResult<String> updateList(@RequestBody SecFeeItemsDTO dto ) { |
| | | List<SecFeeItems> secFeeItemsList = dto.getSecFeeItemsList(); |
| | | secFeeItemsService.updateBatchById(secFeeItemsList); |
| | | secFeeItemsService.saveOrUpdateBatch(secFeeItemsList); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 镜架/镜片品牌表 前端控制器 |
| | | * 镜架-镜片品牌表 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Api(tags = "镜架/镜片品牌表") |
| | | @Api(tags = "镜架-镜片品牌表") |
| | | @RestController |
| | | @RequestMapping("/t-brand") |
| | | public class TBrandController { |
| | |
| | | private TBrandService brandService; |
| | | |
| | | /** |
| | | * 获取镜架/镜片品牌列表 |
| | | * 获取镜架-镜片品牌列表 |
| | | */ |
| | | @ApiOperation(value = "获取镜架/镜片品牌分页列表") |
| | | @ApiOperation(value = "获取镜架-镜片品牌分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TBrandVO>> pageList(@RequestBody TBrandQuery query) { |
| | | return ApiResult.success(brandService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 添加镜架/镜片品牌 |
| | | * 添加镜架-镜片品牌 |
| | | */ |
| | | @ApiOperation(value = "添加镜架/镜片品牌") |
| | | @ApiOperation(value = "添加镜架-镜片品牌") |
| | | @PostMapping(value = "/add") |
| | | public ApiResult<String> add(@Validated @RequestBody TBrand dto) { |
| | | brandService.save(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "修改镜架/镜片品牌--启用、禁用、设置主要品牌接口") |
| | | @ApiOperation(value = "修改镜架-镜片品牌--启用、禁用、设置主要品牌接口") |
| | | @PostMapping(value = "/update") |
| | | public ApiResult<String> update(@RequestBody TBrand dto) { |
| | | brandService.updateById(dto); |
| | | return ApiResult.success(); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除镜架/镜片品牌") |
| | | @ApiOperation(value = "删除镜架-镜片品牌") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public ApiResult<Boolean> deleteById(@RequestParam Long id) { |
| | | return ApiResult.success(brandService.removeById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量删除镜架/镜片品牌") |
| | | @ApiOperation(value = "批量删除镜架-镜片品牌") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public ApiResult<Boolean> deleteByIds(@RequestBody List<Long> ids) { |
| | | return ApiResult.success(brandService.removeByIds(ids)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询镜架/镜片品牌详情") |
| | | @ApiOperation(value = "查询镜架-镜片品牌详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public ApiResult<TBrand> getDetailById(@RequestParam Long id) { |
| | | return ApiResult.success(brandService.getById(id)); |
| | |
| | | for (String s : colorList) { |
| | | TModel model = new TModel(); |
| | | BeanUtils.copyProperties(dto, model); |
| | | model.setId(null); |
| | | model.setColor(s); |
| | | models.add(model); |
| | | } |
| | |
| | | |
| | | /** |
| | | * <p> |
| | | * 镜架/镜片出库入库表 前端控制器 |
| | | * 镜架-镜片出库入库表 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Api(tags = "镜架/镜片出库入库") |
| | | @Api(tags = "镜架-镜片出库入库") |
| | | @RestController |
| | | @RequestMapping("/t-warehousing") |
| | | public class TWarehousingController { |
| | |
| | | @ApiModel(value = "镜架型号DTO") |
| | | public class TModelDTO extends TModel { |
| | | |
| | | @NotNull(message = "镜架型号不能为空") |
| | | @NotNull(message = "镜架色号不能为空") |
| | | @ApiModelProperty(value = "色号集合") |
| | | private List<String> colorList; |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.jilongda.manage.query.TMaterialQuery; |
| | | import com.jilongda.manage.vo.TMaterialVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author 无关风月 |
| | | * @since 2024-12-09 |
| | | */ |
| | | @Mapper |
| | | public interface TMaterialMapper extends BaseMapper<TMaterial> { |
| | | |
| | | /** |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** |
| | | * <p> |
| | | * 镜架型号表 |
| | |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "品牌id") |
| | | @NotNull(message = "品牌不可为空") |
| | | @TableField("brandId") |
| | | private Integer brandId; |
| | | |
| | | @ApiModelProperty(value = "供应商id") |
| | | @NotNull(message = "供应商不可为空") |
| | | @TableField("supplierId") |
| | | private Integer supplierId; |
| | | |
| | | @ApiModelProperty(value = "材质id") |
| | | @NotNull(message = "材质不可为空") |
| | | @TableField("materialId") |
| | | private Integer materialId; |
| | | |
| | | @ApiModelProperty(value = "色号 多个逗号拼接") |
| | | @ApiModelProperty(value = "色号") |
| | | @TableField("color") |
| | | private String color; |
| | | |
| | |
| | | |
| | | import com.jilongda.common.pojo.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "镜架/镜片品牌查询参数") |
| | | public class TBrandQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "1=镜架 2=镜片") |
| | | private Integer type; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.jilongda.common.basic.PageInfo; |
| | | import com.jilongda.manage.mapper.TBrandMapper; |
| | | import com.jilongda.manage.mapper.TMaterialMapper; |
| | | import com.jilongda.manage.mapper.TSupplierMapper; |
| | | import com.jilongda.manage.model.TBrand; |
| | | import com.jilongda.manage.model.TMaterial; |
| | | import com.jilongda.manage.model.TModel; |
| | | import com.jilongda.manage.mapper.TModelMapper; |
| | | import com.jilongda.manage.model.TSupplier; |
| | |
| | | import com.jilongda.manage.vo.TModelVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | |
| | | private TBrandMapper brandMapper; |
| | | @Autowired |
| | | private TSupplierMapper supplierMapper; |
| | | @Autowired |
| | | private TMaterialMapper materialMapper; |
| | | |
| | | @Override |
| | | public Boolean upAndDown(String name, Integer status) { |
| | |
| | | public PageInfo<TModelVO> pageList(TModelQuery query) { |
| | | PageInfo<TModelVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TModelVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | List<Integer> brandIds = list.stream().map(TModel::getBrandId).collect(Collectors.toList()); |
| | | List<Integer> supplierIds= list.stream().map(TModel::getSupplierId).collect(Collectors.toList()); |
| | | List<TBrand> tBrands = brandMapper.selectList(Wrappers.lambdaQuery(TBrand.class) |
| | | .in(TBrand::getId, brandIds)); |
| | | List<TSupplier> tSuppliers = supplierMapper.selectList(Wrappers.lambdaQuery(TSupplier.class) |
| | | .in(TSupplier::getId, supplierIds)); |
| | | for (TModelVO modelVO : list) { |
| | | TBrand tBrand = tBrands.stream().filter(brand -> brand.getId().equals(modelVO.getBrandId())).findFirst().orElse(null); |
| | | if(Objects.nonNull(tBrand)){ |
| | | modelVO.setBrandName(tBrand.getName()); |
| | | if(!CollectionUtils.isEmpty(list)){ |
| | | List<Integer> brandIds = list.stream().map(TModel::getBrandId).collect(Collectors.toList()); |
| | | List<Integer> supplierIds= list.stream().map(TModel::getSupplierId).collect(Collectors.toList()); |
| | | List<Integer> materialIds= list.stream().map(TModel::getMaterialId).collect(Collectors.toList()); |
| | | List<TBrand> tBrands = new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(brandIds)){ |
| | | tBrands = brandMapper.selectList(Wrappers.lambdaQuery(TBrand.class) |
| | | .in(TBrand::getId, brandIds)); |
| | | } |
| | | TSupplier tSupplier = tSuppliers.stream().filter(supplier -> supplier.getId().equals(modelVO.getSupplierId())).findFirst().orElse(null); |
| | | if(Objects.nonNull(tSupplier)){ |
| | | modelVO.setSupplierName(tSupplier.getName()); |
| | | List<TSupplier> tSuppliers = new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(supplierIds)){ |
| | | tSuppliers = supplierMapper.selectList(Wrappers.lambdaQuery(TSupplier.class) |
| | | .in(TSupplier::getId, supplierIds)); |
| | | } |
| | | List<TMaterial> materials = new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(materialIds)){ |
| | | materials = materialMapper.selectList(Wrappers.lambdaQuery(TMaterial.class) |
| | | .in(TMaterial::getId, materialIds)); |
| | | } |
| | | for (TModelVO modelVO : list) { |
| | | TBrand tBrand = tBrands.stream().filter(brand -> brand.getId().equals(modelVO.getBrandId())).findFirst().orElse(null); |
| | | if(Objects.nonNull(tBrand)){ |
| | | modelVO.setBrandName(tBrand.getName()); |
| | | } |
| | | TSupplier tSupplier = tSuppliers.stream().filter(supplier -> supplier.getId().equals(modelVO.getSupplierId())).findFirst().orElse(null); |
| | | if(Objects.nonNull(tSupplier)){ |
| | | modelVO.setSupplierName(tSupplier.getName()); |
| | | } |
| | | TMaterial tMaterial = materials.stream().filter(material -> material.getId().equals(modelVO.getMaterialId())).findFirst().orElse(null); |
| | | if(Objects.nonNull(tMaterial)){ |
| | | modelVO.setMaterialName(tMaterial.getName()); |
| | | } |
| | | // 查询型号的色号 |
| | | List<TModel> colorList = this.list(Wrappers.lambdaQuery(TModel.class) |
| | | .eq(TModel::getName,modelVO.getName())); |
| | | String color = colorList.stream().map(TModel::getColor).collect(Collectors.joining(",")); |
| | | modelVO.setColor(color); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | |
| | | private String brandName; |
| | | @ApiModelProperty(value = "供应商") |
| | | private String supplierName; |
| | | @ApiModelProperty(value = "材质") |
| | | private String materialName; |
| | | } |
| | |
| | | select <include refid="Base_Column_List"></include> |
| | | from t_brand |
| | | where isDelete = ${@com.jilongda.common.enums.DisabledEnum@NO.getCode()} |
| | | <if test="query.type != null"> |
| | | AND `type` = #{query.type} |
| | | </if> |
| | | ORDER BY createTime DESC |
| | | </select> |
| | | |