| | |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TGoods dto) { |
| | | dto.setShopId(tokenService.getLoginUser().getObjectId()); |
| | | dto.setGoodsNum(CodeGenerateUtils.generateVolumeSn()); |
| | | String num = CodeGenerateUtils.generateVolumeSn(); |
| | | long count = goodsService.count(Wrappers.lambdaQuery(TGoods.class) |
| | | .eq(TGoods::getGoodsNum, num)); |
| | | if(count>0){ |
| | | num = CodeGenerateUtils.generateVolumeSn(); |
| | | } |
| | | dto.setGoodsNum(num); |
| | | return AjaxResult.success(goodsService.save(dto)); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.mysql.cj.xdevapi.Collection; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.domain.TBoard; |
| | | import com.ruoyi.system.domain.TShop; |
| | | import com.ruoyi.system.domain.*; |
| | | import com.ruoyi.system.dto.TShopDTO; |
| | | import com.ruoyi.system.query.TShopQuery; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.system.service.TBoardService; |
| | | import com.ruoyi.system.service.TShopService; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.TShopVO; |
| | | 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.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.ruoyi.common.core.domain.AjaxResult.error; |
| | | |
| | |
| | | private final ISysUserService userService; |
| | | private final TBoardService boardService; |
| | | private final TokenService tokenService; |
| | | private final TGoodsService goodsService; |
| | | private final TGoodsTypeService goodsTypeService; |
| | | private final TOrderMealService mealService; |
| | | private final TOrderMealGoodsService mealGoodsService; |
| | | private final TOrderSaleService saleService; |
| | | private final TOrderSaleGoodsService saleGoodsService; |
| | | private final TOrderStockService stockService; |
| | | private final TOrderStockGoodsService stockGoodsService; |
| | | private final TStockDataSetService stockDataSetService; |
| | | private final TDataGeneratorService dataGeneratorService; |
| | | |
| | | @Autowired |
| | | public TShopController(TShopService shopService, ISysUserService userService, TBoardService boardService, TokenService tokenService) { |
| | | public TShopController(TShopService shopService, ISysUserService userService, TBoardService boardService, TokenService tokenService, TGoodsService goodsService, TGoodsTypeService goodsTypeService, TOrderMealService mealService, TOrderMealGoodsService mealGoodsService, TOrderSaleService saleService, TOrderSaleGoodsService saleGoodsService, TOrderStockService stockService, TOrderStockGoodsService stockGoodsService, TStockDataSetService stockDataSetService, TDataGeneratorService dataGeneratorService) { |
| | | this.shopService = shopService; |
| | | this.userService = userService; |
| | | this.boardService = boardService; |
| | | this.tokenService = tokenService; |
| | | this.goodsService = goodsService; |
| | | this.goodsTypeService = goodsTypeService; |
| | | this.mealService = mealService; |
| | | this.mealGoodsService = mealGoodsService; |
| | | this.saleService = saleService; |
| | | this.saleGoodsService = saleGoodsService; |
| | | this.stockService = stockService; |
| | | this.stockGoodsService = stockGoodsService; |
| | | this.stockDataSetService = stockDataSetService; |
| | | this.dataGeneratorService = dataGeneratorService; |
| | | } |
| | | |
| | | /** |
| | |
| | | if(Objects.nonNull(sysUser)){ |
| | | userService.deleteUserById(sysUser.getUserId()); |
| | | } |
| | | // 删除店铺下的桌子 |
| | | long boardCount = boardService.count(Wrappers.lambdaQuery(TBoard.class) |
| | | .eq(TBoard::getShopId, id)); |
| | | if(boardCount>0){ |
| | | boardService.deleteByShopId(id); |
| | | } |
| | | // 删除店铺下的餐品分类 |
| | | long goodsCount = goodsService.count(Wrappers.lambdaQuery(TGoods.class) |
| | | .eq(TGoods::getShopId, id)); |
| | | if(goodsCount>0){ |
| | | goodsService.deleteByShopId(id); |
| | | } |
| | | long goodsTypeCount = goodsTypeService.count(Wrappers.lambdaQuery(TGoodsType.class) |
| | | .eq(TGoodsType::getShopId, id)); |
| | | if (goodsTypeCount>0){ |
| | | goodsTypeService.deleteByShopId(id); |
| | | } |
| | | // 删除店铺下的餐饮订单 |
| | | List<TOrderMeal> mealList = mealService.list(Wrappers.lambdaQuery(TOrderMeal.class) |
| | | .eq(TOrderMeal::getShopId, id)); |
| | | List<Long> mealIds = mealList.stream().map(TOrderMeal::getId).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(mealIds)){ |
| | | mealGoodsService.deleteByOrderId(mealIds); |
| | | mealService.deleteByShopId(id); |
| | | } |
| | | // 删除店铺下的销售数据 |
| | | List<TOrderSale> saleList = saleService.list(Wrappers.lambdaQuery(TOrderSale.class) |
| | | .eq(TOrderSale::getShopId, id)); |
| | | List<Long> saleIds = saleList.stream().map(TOrderSale::getId).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(saleIds)){ |
| | | saleGoodsService.deleteByOrderId(saleIds); |
| | | saleService.deleteByShopId(id); |
| | | } |
| | | // 删除店铺下的进货数据 |
| | | List<TOrderStock> stockList = stockService.list(Wrappers.lambdaQuery(TOrderStock.class) |
| | | .eq(TOrderStock::getShopId, id)); |
| | | List<Long> stockIds = stockList.stream().map(TOrderStock::getId).collect(Collectors.toList()); |
| | | if(!CollectionUtils.isEmpty(stockIds)){ |
| | | stockGoodsService.deleteByOrderId(stockIds); |
| | | stockService.deleteByShopId(id); |
| | | } |
| | | // 删除店铺下的生成数据 |
| | | long dataGeneratorCount = dataGeneratorService.count(Wrappers.lambdaQuery(TDataGenerator.class) |
| | | .eq(TDataGenerator::getShopId, id)); |
| | | if (dataGeneratorCount>0){ |
| | | dataGeneratorService.deleteByShopId(id); |
| | | } |
| | | return AjaxResult.success(shopService.removeById(id)); |
| | | } |
| | | |
| | |
| | | */ |
| | | public static String generateVolumeSn() { |
| | | Calendar calendar = Calendar.getInstance(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddhhmmss"); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd"); |
| | | String dateTime = dateFormat.format(calendar.getTime()); |
| | | dateTime = dateTime.substring(2); |
| | | String timestampPart = "" + (Math.random() * 10000) * (System.currentTimeMillis() / 10000); |
| | |
| | | int day = calendar.get(Calendar.DAY_OF_MONTH); |
| | | double v = Math.random() * 10000; |
| | | int dayNum = (int) ((v % 3.33) * day); |
| | | String dayPart = "0" + dayNum; |
| | | dayPart = dayPart.substring(dayPart.length() - 2); |
| | | String dayPart = "001" + dayNum; |
| | | dayPart = dayPart.substring(dayPart.length() - 3); |
| | | return dateTime + timestampPart + dayPart; |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.system.domain.TBoard; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Mapper |
| | | public interface TBoardMapper extends BaseMapper<TBoard> { |
| | | |
| | | /** |
| | | * 根据店铺id删除 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(@Param("shopId") Long shopId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<TDataGeneratorVO> pageList(@Param("query") TDataGeneratorQuery query, @Param("pageInfo")PageInfo<TDataGeneratorVO> pageInfo); |
| | | |
| | | /** |
| | | * 数据生成删除 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(@Param("shopId")Long shopId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<TGoodsVO> pageList(@Param("query") TGoodsQuery query, @Param("pageInfo") PageInfo<TGoodsVO> pageInfo); |
| | | |
| | | /** |
| | | * 根据商家id删除商品管理 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(@Param("shopId")Long shopId); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.system.domain.TGoodsType; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TGoodsTypeMapper extends BaseMapper<TGoodsType> { |
| | | |
| | | /** |
| | | * 根据商家id删除 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(@Param("shopId") Long shopId); |
| | | } |
| | |
| | | */ |
| | | List<SalesRankingVO> salesRanking(@Param("ids")List<Long> ids, @Param("pageInfo")PageInfo<SalesRankingVO> pageInfo); |
| | | |
| | | void deleteByOrderId(@Param("mealIds")List<Long> mealIds); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<GoodsProfitVO> profitDetailsExport(@Param("query")ProfitDetailsQuery query); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(@Param("shopId")Long shopId); |
| | | |
| | | } |
| | |
| | | */ |
| | | List<SalesRankingVO> salesRanking(@Param("ids")List<Long> ids, @Param("pageInfo")PageInfo<SalesRankingVO> pageInfo); |
| | | |
| | | /** |
| | | * 删除销售单商品 |
| | | * @param saleIds |
| | | */ |
| | | void deleteByOrderId(@Param("saleIds")List<Long> saleIds); |
| | | |
| | | } |
| | |
| | | */ |
| | | List<GoodsProfitVO> profitDetailsExport(@Param("query")ProfitDetailsQuery query); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(@Param("shopId")Long shopId); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<TOrderStockGoods> getListByTimeAndShopId(@Param("orderTime") String orderTime, @Param("shopId")Long shopId); |
| | | |
| | | /** |
| | | * 删除进货单商品 |
| | | * @param stockIds |
| | | */ |
| | | void deleteByOrderId(@Param("stockIds")List<Long> stockIds); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<TOrderStockVO> stockGeneratorExport(@Param("query")TDataGeneratorStockQuery query); |
| | | |
| | | /** |
| | | * 进货删除 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(@Param("shopId")Long shopId); |
| | | } |
| | |
| | | */ |
| | | public interface TBoardService extends IService<TBoard> { |
| | | |
| | | /** |
| | | * 根据店铺id删除 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(Long shopId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<TOrderSaleVO> mealGeneratorExport(TDataGeneratorMealQuery query); |
| | | |
| | | /** |
| | | * 餐饮数据生成列表删除 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(Long shopId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | PageInfo<TGoodsVO> pageList(TGoodsQuery query); |
| | | |
| | | /** |
| | | * 删除商品管理 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(Long shopId); |
| | | } |
| | |
| | | */ |
| | | public interface TGoodsTypeService extends IService<TGoodsType> { |
| | | |
| | | /** |
| | | * 根据商家id删除 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(Long shopId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | BigDecimal costTotal(List<Long> ids); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param mealIds |
| | | */ |
| | | void deleteByOrderId(List<Long> mealIds); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<GoodsProfitVO> profitDetailsExport(ProfitDetailsQuery query); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(Long shopId); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | BigDecimal costTotal(List<Long> ids); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param saleIds |
| | | */ |
| | | void deleteByOrderId(List<Long> saleIds); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | List<GoodsProfitVO> profitDetailsExport(ProfitDetailsQuery query); |
| | | |
| | | /** |
| | | * 删除销售数据 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(Long shopId); |
| | | |
| | | } |
| | |
| | | */ |
| | | List<TOrderStockGoods> getListByTimeAndShopId(String orderTime, Long shopId); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param stockIds |
| | | */ |
| | | void deleteByOrderId(List<Long> stockIds); |
| | | } |
| | |
| | | * @param dto |
| | | */ |
| | | void editGenerator(TOrderStockDTO dto); |
| | | |
| | | /** |
| | | * 删除 |
| | | * @param shopId |
| | | */ |
| | | void deleteByShopId(Long shopId); |
| | | } |
| | |
| | | @Service |
| | | public class TBoardServiceImpl extends ServiceImpl<TBoardMapper, TBoard> implements TBoardService { |
| | | |
| | | @Override |
| | | public void deleteByShopId(Long shopId) { |
| | | this.baseMapper.deleteByShopId(shopId); |
| | | } |
| | | } |
| | |
| | | orderMeal.setMealType(1); |
| | | orderMeal.setMealPerson(random); |
| | | orderMeal.setMealTime(orderMealGeneratorCountDTO.getTime()); |
| | | orderMeal.setOrderNum(OrderNumConstants.MEAL + CodeGenerateUtils.generateVolumeSn()); |
| | | String num = OrderNumConstants.MEAL + CodeGenerateUtils.generateVolumeSn(); |
| | | // long count1 = orderMealService.count(Wrappers.lambdaQuery(TOrderMeal.class) |
| | | // .eq(TOrderMeal::getOrderNum, num)); |
| | | // if(count1>0){ |
| | | // num = CodeGenerateUtils.generateVolumeSn(); |
| | | // } |
| | | orderMeal.setOrderNum(num); |
| | | orderMeal.setStatus(2); |
| | | List<TOrderMealGoods> orderMealGoods = new ArrayList<>(); |
| | | // 获取当前桌的菜品 |
| | |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByShopId(Long shopId) { |
| | | this.baseMapper.deleteByShopId(shopId); |
| | | } |
| | | |
| | | private int getRandomPayType(Integer size,BigDecimal count) { |
| | | BigDecimal bigDecimal = new BigDecimal(size).multiply(count.divide(new BigDecimal(100))).setScale(0, BigDecimal.ROUND_FLOOR); |
| | | return Integer.parseInt(bigDecimal.toString()); |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByShopId(Long shopId) { |
| | | this.baseMapper.deleteByShopId(shopId); |
| | | } |
| | | } |
| | |
| | | @Service |
| | | public class TGoodsTypeServiceImpl extends ServiceImpl<TGoodsTypeMapper, TGoodsType> implements TGoodsTypeService { |
| | | |
| | | @Override |
| | | public void deleteByShopId(Long shopId) { |
| | | this.baseMapper.deleteByShopId(shopId); |
| | | } |
| | | } |
| | |
| | | public BigDecimal costTotal(List<Long> ids) { |
| | | return this.baseMapper.costTotal(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByOrderId(List<Long> mealIds) { |
| | | this.baseMapper.deleteByOrderId(mealIds); |
| | | } |
| | | } |
| | |
| | | return this.baseMapper.profitDetailsExport(query); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByShopId(Long shopId) { |
| | | this.baseMapper.deleteByShopId(shopId); |
| | | } |
| | | |
| | | } |
| | |
| | | public BigDecimal costTotal(List<Long> ids) { |
| | | return this.baseMapper.costTotal(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByOrderId(List<Long> saleIds) { |
| | | this.baseMapper.deleteByOrderId(saleIds); |
| | | } |
| | | } |
| | |
| | | public List<GoodsProfitVO> profitDetailsExport(ProfitDetailsQuery query) { |
| | | return this.baseMapper.profitDetailsExport(query); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByShopId(Long shopId) { |
| | | this.baseMapper.deleteByShopId(shopId); |
| | | } |
| | | } |
| | |
| | | public List<TOrderStockGoods> getListByTimeAndShopId(String orderTime, Long shopId) { |
| | | return this.baseMapper.getListByTimeAndShopId(orderTime,shopId); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByOrderId(List<Long> stockIds) { |
| | | this.baseMapper.deleteByOrderId(stockIds); |
| | | } |
| | | } |
| | |
| | | }); |
| | | tOrderStockGoodsService.saveBatch(orderStockGoods); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByShopId(Long shopId) { |
| | | this.baseMapper.deleteByShopId(shopId); |
| | | } |
| | | } |
| | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.TBoard"> |
| | | <id column="id" property="id" /> |
| | | <result column="companyId" property="companyId" /> |
| | | <result column="shopId" property="shopId" /> |
| | | <result column="boardName" property="boardName" /> |
| | | <result column="minPerson" property="minPerson" /> |
| | | <result column="maxPerson" property="maxPerson" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id,companyId, boardName, minPerson, maxPerson, createTime, updateTime, disabled, createBy, updateBy, status |
| | | id,shopId, boardName, minPerson, maxPerson, createTime, updateTime, disabled, createBy, updateBy, status |
| | | </sql> |
| | | <delete id="deleteByShopId"> |
| | | delete from t_board where shopId = #{shopId} |
| | | </delete> |
| | | |
| | | </mapper> |
| | |
| | | id, userId, userName, shopId, startTime, endTime, minMoney, maxMoney, status, createTime, updateTime, disabled, createBy, updateBy,orderType,weiXinPay, |
| | | aliPay,cardPay,moneyPay,otherPay |
| | | </sql> |
| | | <delete id="deleteByShopId"> |
| | | delete from t_data_generator where shopId = #{shopId} |
| | | </delete> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TDataGeneratorVO"> |
| | | select tdg.id, tdg.userId, tdg.userName, tdg.shopId, tdg.startTime, tdg.endTime, tdg.minMoney, tdg.maxMoney, tdg.status, tdg.createTime, |
| | | tdg.updateTime, tdg.disabled, tdg.createBy, tdg.updateBy,tdg.orderType,tdg.weiXinPay,tdg.aliPay,tdg.cardPay,tdg.moneyPay,tdg.otherPay, |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, goodsNum, goodsName, typeId, costPrice, salePrice, goodsPicture, createTime, updateTime, disabled, createBy, updateBy, inventory,shopId |
| | | </sql> |
| | | <delete id="deleteByShopId"> |
| | | delete from t_goods where shopId = #{shopId} |
| | | </delete> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TGoodsVO"> |
| | | select |
| | | t.id, |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, typeName, createTime, updateTime, disabled, createBy, updateBy,shopId |
| | | </sql> |
| | | <delete id="deleteByShopId"> |
| | | delete from t_goods_type where shopId = #{shopId} |
| | | </delete> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, goodsNum, goodsName, goodsSalePrice, goodsPicture, goodsCount, orderId,typeName,costPrice,typeId,goodsId,createTime |
| | | </sql> |
| | | <delete id="deleteByOrderId"> |
| | | delete from t_order_meal_goods where orderId in |
| | | <foreach collection="mealIds" separator="," item="orderId" open="(" close=")"> |
| | | #{orderId} |
| | | </foreach> |
| | | </delete> |
| | | <select id="costTotal" resultType="java.math.BigDecimal"> |
| | | select sum(costPrice*goodsCount) from t_order_meal_goods |
| | | <where> |
| | |
| | | id, boardId, mealType, mealPerson, orderMoney, payMoney, payType, createTime, updateTime, disabled, |
| | | createBy, updateBy, orderNum, status,isCover,shopId,generatorId,remark,mealTime |
| | | </sql> |
| | | <delete id="deleteByShopId"> |
| | | delete from t_order_meal where shopId = #{shopId} |
| | | </delete> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TOrderMealVO"> |
| | | select |
| | | tom.id, tom.boardId, tom.mealType, tom.mealPerson, tom.orderMoney, tom.payMoney, tom.payType, tom.createTime, tom.updateTime, tom.disabled, |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, orderId, goodsNum, goodsName, goodsCostPrice, goodsSalePrice, goodsCount, thisSalePrice, goodsPicture,typeId,goodsId |
| | | </sql> |
| | | <delete id="deleteByOrderId"> |
| | | DELETE FROM t_order_sale_goods WHERE orderId in |
| | | <foreach collection="saleIds" item="orderId" separator="," open="(" close=")"> |
| | | #{orderId} |
| | | </foreach> |
| | | </delete> |
| | | <select id="costTotal" resultType="java.math.BigDecimal"> |
| | | select sum(goodsCostPrice) from t_order_sale_goods |
| | | <where> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, orderTime, remark, createTime, updateTime, disabled, createBy, updateBy, orderNum, status,orderMoney,payMoney,shopId,generatorId,payType,isCover |
| | | </sql> |
| | | <delete id="deleteByShopId"> |
| | | delete from t_order_sale where shopId = #{shopId} |
| | | </delete> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TOrderSaleVO"> |
| | | select id, orderTime, remark, createTime, updateTime, disabled, createBy, updateBy, orderNum, status,orderMoney,payMoney,shopId,generatorId,payType,isCover |
| | | from t_order_sale |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, orderId, goodsNum, goodsName, costPrice, salePrice, goodsPicture, stockCount,thisCostPrice,goodsId |
| | | </sql> |
| | | <delete id="deleteByOrderId"> |
| | | delete from t_order_stock_goods where orderId in |
| | | <foreach collection="stockIds" close=")" open="(" separator="," item="orderId"> |
| | | #{orderId} |
| | | </foreach> |
| | | </delete> |
| | | <select id="getListByTimeAndShopId" resultType="com.ruoyi.system.domain.TOrderStockGoods"> |
| | | select t.id, t.orderId, t.goodsNum, t.goodsName, t.costPrice, t.salePrice, t.goodsPicture, t.stockCount,t.thisCostPrice,t.goodsId |
| | | from t_order_stock_goods t |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, stockNum, stockTime, createTime, updateTime, disabled, createBy, updateBy,isCover,shopId,generatorId,stockTotalPrice |
| | | </sql> |
| | | <delete id="deleteByShopId"> |
| | | DELETE FROM t_order_stock WHERE shopId = #{shopId} |
| | | </delete> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TOrderStockVO"> |
| | | SELECT <include refid="Base_Column_List"></include> |
| | | FROM t_order_stock |