84 changed files with 2058 additions and 8 deletions
@ -0,0 +1,28 @@ |
|||||
|
package cc.hiver.core.common.constant; |
||||
|
|
||||
|
/** |
||||
|
* 商城静态常量 |
||||
|
* |
||||
|
* @author Yazhi Li |
||||
|
*/ |
||||
|
public interface ShopConstant { |
||||
|
/** |
||||
|
* 上架 |
||||
|
*/ |
||||
|
Integer GOODS_PUT_ON_SALE = 0; |
||||
|
|
||||
|
/** |
||||
|
* 下架 |
||||
|
*/ |
||||
|
Integer GOODS_PULL_ON_SALE = -1; |
||||
|
|
||||
|
/** |
||||
|
* 通用规格 |
||||
|
*/ |
||||
|
Integer GOODS_ATTRIBUTE_COMMON = 0; |
||||
|
|
||||
|
/** |
||||
|
* 定制规格 |
||||
|
*/ |
||||
|
Integer GOODS_ATTRIBUTE_CUSTOM = 1; |
||||
|
} |
||||
@ -0,0 +1,13 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
|
<parent> |
||||
|
<groupId>cc.hiver</groupId> |
||||
|
<artifactId>hiver-modules</artifactId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</parent> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
<name>商铺模块</name> |
||||
|
<artifactId>hiver-shop</artifactId> |
||||
|
</project> |
||||
@ -0,0 +1,61 @@ |
|||||
|
package cc.hiver.shop.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.shop.entity.Address; |
||||
|
import cc.hiver.shop.service.AddressService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "收货地址接口") |
||||
|
@RequestMapping(value = "/hiver/app/address/") |
||||
|
@Transactional |
||||
|
public class AddressController { |
||||
|
@Autowired |
||||
|
private AddressService addressService; |
||||
|
|
||||
|
@RequestMapping(value = "/getAll/{memberId}", method = RequestMethod.GET) |
||||
|
@ApiOperation(value = "根据会员id获得收货地址列表") |
||||
|
public Result getAllByMemberId(@PathVariable String memberId) { |
||||
|
List<Address> list = addressService.findAllByMemberId(memberId); |
||||
|
return ResultUtil.data(list); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/get/{id}", method = RequestMethod.GET) |
||||
|
@ApiOperation(value = "通过id获取") |
||||
|
public Result<Address> get(@PathVariable String id) { |
||||
|
Address data = addressService.findById(id); |
||||
|
return new ResultUtil<Address>().setData(data); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/save", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "保存数据") |
||||
|
public Result<Address> save(Address entity) { |
||||
|
Address address = addressService.save(entity); |
||||
|
return new ResultUtil<Address>().setData(address); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/edit", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "更新数据") |
||||
|
public Result<Address> edit(Address entity) { |
||||
|
Address address = addressService.update(entity); |
||||
|
return new ResultUtil<Address>().setData(address); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/delByIds", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "批量通过ids删除") |
||||
|
public Result delByIds(@RequestParam String[] ids) { |
||||
|
for (String id : ids) { |
||||
|
addressService.delete(id); |
||||
|
} |
||||
|
return ResultUtil.success("批量通过id删除数据成功"); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,63 @@ |
|||||
|
package cc.hiver.shop.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.PageUtil; |
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.vo.PageVo; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.shop.entity.CustomAddress; |
||||
|
import cc.hiver.shop.service.CustomAddressService; |
||||
|
import cc.hiver.shop.dto.CustomAddressQueryCriteria; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.data.domain.Page; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "客户地址接口") |
||||
|
@RequestMapping(value = "/hiver/app/customAddress/") |
||||
|
@Transactional |
||||
|
public class CustomAddressController { |
||||
|
@Autowired |
||||
|
private CustomAddressService customAddressService; |
||||
|
|
||||
|
@RequestMapping(value = "/getByCondition", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "根据条件获得分页") |
||||
|
public Result<Page<CustomAddress>> queryAll(CustomAddressQueryCriteria criteria, PageVo pageVo) { |
||||
|
Page<CustomAddress> users = customAddressService.queryAll(criteria, PageUtil.initPage(pageVo)); |
||||
|
return new ResultUtil<Page<CustomAddress>>().setData(users); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/get/{id}", method = RequestMethod.GET) |
||||
|
@ApiOperation(value = "通过id获取") |
||||
|
public Result<CustomAddress> get(@PathVariable String id) { |
||||
|
CustomAddress data = customAddressService.findById(id); |
||||
|
return new ResultUtil<CustomAddress>().setData(data); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/save", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "保存数据") |
||||
|
public Result<CustomAddress> save(CustomAddress entity) { |
||||
|
CustomAddress address = customAddressService.save(entity); |
||||
|
return new ResultUtil<CustomAddress>().setData(address); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/edit", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "更新数据") |
||||
|
public Result<CustomAddress> edit(CustomAddress entity) { |
||||
|
CustomAddress address = customAddressService.update(entity); |
||||
|
return new ResultUtil<CustomAddress>().setData(address); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/delByIds", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "批量通过ids删除") |
||||
|
public Result delByIds(@RequestParam String[] ids) { |
||||
|
for (String id : ids) { |
||||
|
customAddressService.delete(id); |
||||
|
} |
||||
|
return ResultUtil.success("批量通过id删除数据成功"); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,89 @@ |
|||||
|
package cc.hiver.shop.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.shop.entity.GoodsAttributeKey; |
||||
|
import cc.hiver.shop.entity.GoodsAttributeValue; |
||||
|
import cc.hiver.shop.entity.Mall; |
||||
|
import cc.hiver.shop.service.GoodsAttributeKeyService; |
||||
|
import cc.hiver.shop.service.GoodsAttributeValueService; |
||||
|
import cc.hiver.shop.service.MallService; |
||||
|
import cc.hiver.shop.dto.GoodsAttributeDto; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMethod; |
||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "商品规格接口") |
||||
|
@RequestMapping(value = "/hiver/app/goodsAttribute/") |
||||
|
@Transactional |
||||
|
public class GoodsAttributeController { |
||||
|
@Autowired |
||||
|
private GoodsAttributeKeyService goodsAttributeKeyService; |
||||
|
|
||||
|
@Autowired |
||||
|
private GoodsAttributeValueService goodsAttributeValueService; |
||||
|
|
||||
|
@Autowired |
||||
|
private MallService mallService; |
||||
|
|
||||
|
@RequestMapping(value = "/save", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "保存数据") |
||||
|
public Result save(GoodsAttributeDto entity) { |
||||
|
GoodsAttributeKey attributeKey = new GoodsAttributeKey(); |
||||
|
attributeKey.setMallId(entity.getMallId()); |
||||
|
attributeKey.setCategoryId(entity.getCategoryId()); |
||||
|
attributeKey.setAttributeKey(entity.getAttributeKey()); |
||||
|
Mall mall = mallService.findById(entity.getMallId()); |
||||
|
if(mall == null) { |
||||
|
return ResultUtil.error("商铺不存在"); |
||||
|
} |
||||
|
attributeKey.setRegion(mall.getRegion()); |
||||
|
GoodsAttributeKey goodsAttributeKey = goodsAttributeKeyService.save(attributeKey); |
||||
|
for(String value : entity.getAttributeValues()) { |
||||
|
GoodsAttributeValue goodsAttributeValue = new GoodsAttributeValue(); |
||||
|
goodsAttributeValue.setAttributeId(goodsAttributeKey.getId()); |
||||
|
goodsAttributeValue.setAttributeValue(value); |
||||
|
goodsAttributeValueService.save(goodsAttributeValue); |
||||
|
} |
||||
|
return ResultUtil.success(); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/edit", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "更新数据") |
||||
|
public Result edit(GoodsAttributeDto entity) { |
||||
|
GoodsAttributeKey goodsAttributeKey = goodsAttributeKeyService.findById(entity.getId()); |
||||
|
goodsAttributeKey.setAttributeKey(entity.getAttributeKey()); |
||||
|
List<GoodsAttributeValue> values = goodsAttributeValueService.findAllBykAndAttributeId(entity.getId()); |
||||
|
goodsAttributeValueService.delete(values); |
||||
|
for(String v : entity.getAttributeValues()) { |
||||
|
GoodsAttributeValue goodsAttributeValue = new GoodsAttributeValue(); |
||||
|
goodsAttributeValue.setAttributeId(entity.getId()); |
||||
|
goodsAttributeValue.setAttributeValue(v); |
||||
|
goodsAttributeValueService.save(goodsAttributeValue); |
||||
|
} |
||||
|
return ResultUtil.success(); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/delByIds", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "批量通过ids删除") |
||||
|
public Result delByIds(@RequestParam String[] ids) { |
||||
|
for (String id : ids) { |
||||
|
List<GoodsAttributeValue> values = goodsAttributeValueService.getAll(); |
||||
|
for(GoodsAttributeValue value : values) { |
||||
|
goodsAttributeValueService.delete(value); |
||||
|
} |
||||
|
goodsAttributeKeyService.delete(id); |
||||
|
} |
||||
|
return ResultUtil.success("批量通过id删除数据成功"); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,41 @@ |
|||||
|
package cc.hiver.shop.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.shop.entity.GoodsCategory; |
||||
|
import cc.hiver.shop.service.GoodsCategoryService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMethod; |
||||
|
import org.springframework.web.bind.annotation.RequestParam; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "商品分类接口") |
||||
|
@RequestMapping(value = "/hiver/app/goodsCategory/") |
||||
|
@Transactional |
||||
|
public class GoodsCategoryController { |
||||
|
@Autowired |
||||
|
private GoodsCategoryService goodsCategoryService; |
||||
|
|
||||
|
@RequestMapping(value = "/save", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "保存数据") |
||||
|
public Result<GoodsCategory> save(GoodsCategory entity) { |
||||
|
GoodsCategory address = goodsCategoryService.save(entity); |
||||
|
return new ResultUtil<GoodsCategory>().setData(address); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/delByIds", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "批量通过ids删除") |
||||
|
public Result delByIds(@RequestParam String[] ids) { |
||||
|
for (String id : ids) { |
||||
|
goodsCategoryService.delete(id); |
||||
|
} |
||||
|
return ResultUtil.success("批量通过id删除数据成功"); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
package cc.hiver.shop.controller; |
||||
|
|
||||
|
import cc.hiver.shop.service.GoodsService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "商品接口") |
||||
|
@RequestMapping(value = "/hiver/app/goods/") |
||||
|
@Transactional |
||||
|
public class GoodsController { |
||||
|
@Autowired |
||||
|
private GoodsService goodsService; |
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
package cc.hiver.shop.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.shop.entity.GoodsInStock; |
||||
|
import cc.hiver.shop.entity.GoodsStock; |
||||
|
import cc.hiver.shop.service.GoodsInStockService; |
||||
|
import cc.hiver.shop.service.GoodsStockService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMethod; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "商品库存接口") |
||||
|
@RequestMapping(value = "/hiver/app/goodsStock/") |
||||
|
@Transactional |
||||
|
public class GoodsStockController { |
||||
|
@Autowired |
||||
|
private GoodsStockService goodsStockService; |
||||
|
|
||||
|
@Autowired |
||||
|
private GoodsInStockService goodsInStockService; |
||||
|
|
||||
|
@RequestMapping(value = "/stockIn", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "入库操作") |
||||
|
public Result save(GoodsInStock entity) { |
||||
|
goodsInStockService.save(entity); |
||||
|
GoodsStock goodsStock = goodsStockService.findById(entity.getGoodsStockId()); |
||||
|
goodsStock.setStock(goodsStock.getStock() + entity.getNum()); |
||||
|
goodsStockService.update(goodsStock); |
||||
|
return ResultUtil.success(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
package cc.hiver.shop.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.shop.entity.Mall; |
||||
|
import cc.hiver.shop.entity.UserMall; |
||||
|
import cc.hiver.shop.service.MallService; |
||||
|
import cc.hiver.shop.service.UserMallService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "商铺接口") |
||||
|
@RequestMapping(value = "/hiver/app/mall/") |
||||
|
@Transactional |
||||
|
public class MallController { |
||||
|
@Autowired |
||||
|
private MallService mallService; |
||||
|
|
||||
|
@Autowired |
||||
|
private UserMallService userMallService; |
||||
|
|
||||
|
@RequestMapping(value = "/get/{id}", method = RequestMethod.GET) |
||||
|
@ApiOperation(value = "通过id获取") |
||||
|
public Result<Mall> get(@PathVariable String id) { |
||||
|
Mall data = mallService.findById(id); |
||||
|
return new ResultUtil<Mall>().setData(data); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/save", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "保存数据") |
||||
|
public Result<Mall> save(Mall entity) { |
||||
|
Mall mall = mallService.save(entity); |
||||
|
return new ResultUtil<Mall>().setData(mall); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/edit", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "更新数据") |
||||
|
public Result<Mall> edit(Mall entity) { |
||||
|
Mall mall = mallService.update(entity); |
||||
|
return new ResultUtil<Mall>().setData(mall); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/delByIds", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "批量通过ids删除") |
||||
|
public Result delByIds(@RequestParam String[] ids) { |
||||
|
for (String id : ids) { |
||||
|
mallService.delete(id); |
||||
|
} |
||||
|
return ResultUtil.success("批量通过id删除数据成功"); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/set", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "设置用户对应商铺") |
||||
|
public Result save(String mallId, List<String> userIds) { |
||||
|
userMallService.deleteAllByMallId(mallId); |
||||
|
for(String userId : userIds) { |
||||
|
UserMall userMall = new UserMall(); |
||||
|
userMall.setMallId(mallId); |
||||
|
userMall.setUserId(userId); |
||||
|
userMallService.save(userMall); |
||||
|
} |
||||
|
return ResultUtil.success(); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/getAll", method = RequestMethod.GET) |
||||
|
@ApiOperation(value = "根据会员id获得商铺列表") |
||||
|
public Result getAllByUserId(String userId) { |
||||
|
List<Mall> list = mallService.findAllByUserId(userId); |
||||
|
return ResultUtil.data(list); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,49 @@ |
|||||
|
package cc.hiver.shop.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.shop.dto.PopularUrlDto; |
||||
|
import cc.hiver.shop.entity.PopularUrlGoods; |
||||
|
import cc.hiver.shop.service.PopularUrlGoodsService; |
||||
|
import cc.hiver.shop.service.PopularUrlService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMethod; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "热销商品接口") |
||||
|
@RequestMapping(value = "/hiver/app/popularUrl/") |
||||
|
@Transactional |
||||
|
public class PopularUrlController { |
||||
|
@Autowired |
||||
|
private PopularUrlService popularUrlService; |
||||
|
|
||||
|
@Autowired |
||||
|
private PopularUrlGoodsService popularUrlGoodsService; |
||||
|
|
||||
|
@RequestMapping(value = "/create", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "创建分享链接") |
||||
|
public Result<String> create(PopularUrlDto entity) { |
||||
|
popularUrlService.save(entity.getUrl()); |
||||
|
for(PopularUrlGoods good : entity.getGoods()) { |
||||
|
popularUrlGoodsService.save(good); |
||||
|
} |
||||
|
return ResultUtil.data(entity.getUrl().getUrl()); |
||||
|
} |
||||
|
|
||||
|
@RequestMapping(value = "/get/{id}", method = RequestMethod.GET) |
||||
|
@ApiOperation(value = "通过id获取") |
||||
|
public Result<PopularUrlDto> get(@PathVariable String id) { |
||||
|
PopularUrlDto data = new PopularUrlDto(); |
||||
|
data.setUrl(popularUrlService.get(id)); |
||||
|
data.setGoods(popularUrlGoodsService.findAllByUrlId(id)); |
||||
|
return new ResultUtil<PopularUrlDto>().setData(data); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
package cc.hiver.shop.controller; |
||||
|
|
||||
|
import cc.hiver.shop.service.RoleSettingService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "角色配置接口") |
||||
|
@RequestMapping(value = "/hiver/app/roleSetting/") |
||||
|
@Transactional |
||||
|
public class RoleSettingController { |
||||
|
@Autowired |
||||
|
private RoleSettingService roleSettingService; |
||||
|
} |
||||
@ -0,0 +1,38 @@ |
|||||
|
package cc.hiver.shop.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.shop.entity.ShoppingCart; |
||||
|
import cc.hiver.shop.service.ShoppingCartGoodsService; |
||||
|
import cc.hiver.shop.service.ShoppingCartService; |
||||
|
import cc.hiver.shop.dto.SalesSlipDto; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMethod; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "购物车接口") |
||||
|
@RequestMapping(value = "/hiver/app/shoppingCart/") |
||||
|
@Transactional |
||||
|
public class ShoppingCartController { |
||||
|
@Autowired |
||||
|
private ShoppingCartService shoppingCartService; |
||||
|
|
||||
|
@Autowired |
||||
|
private ShoppingCartGoodsService shoppingCartGoodsService; |
||||
|
|
||||
|
@RequestMapping(value = "/create", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "创建销售单") |
||||
|
public Result<SalesSlipDto> create(ShoppingCart entity) { |
||||
|
ShoppingCart shoppingCart = shoppingCartService.save(entity); |
||||
|
SalesSlipDto salesSlip = new SalesSlipDto(); |
||||
|
salesSlip.setShoppingCart(shoppingCart); |
||||
|
return new ResultUtil<SalesSlipDto>().setData(salesSlip); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
package cc.hiver.shop.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.shop.entity.UserClockIn; |
||||
|
import cc.hiver.shop.service.UserClockInService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMethod; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "用户打卡接口") |
||||
|
@RequestMapping(value = "/hiver/app/clockIn") |
||||
|
@Transactional |
||||
|
public class UserClockInController { |
||||
|
@Autowired |
||||
|
private UserClockInService userClockInService; |
||||
|
|
||||
|
@RequestMapping(value = "/", method = RequestMethod.GET) |
||||
|
@ApiOperation(value = "打卡操作") |
||||
|
public Result clockIn(String userId) { |
||||
|
UserClockIn userClockIn = new UserClockIn(); |
||||
|
userClockIn.setUserId(userId); |
||||
|
userClockInService.save(userClockIn); |
||||
|
return ResultUtil.success(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.Address; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface AddressDao extends HiverBaseDao<Address, String> { |
||||
|
List<Address> findAllByMemberId(String memberId); |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.CustomAddress; |
||||
|
|
||||
|
public interface CustomAddressDao extends HiverBaseDao<CustomAddress, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.GoodsAttributeKey; |
||||
|
|
||||
|
public interface GoodsAttributeKeyDao extends HiverBaseDao<GoodsAttributeKey, String> { |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.GoodsAttributeValue; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface GoodsAttributeValueDao extends HiverBaseDao<GoodsAttributeValue, String> { |
||||
|
List<GoodsAttributeValue> findAllBykAndAttributeId(String attributeId); |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.GoodsCategory; |
||||
|
|
||||
|
public interface GoodsCategoryDao extends HiverBaseDao<GoodsCategory, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.Goods; |
||||
|
|
||||
|
public interface GoodsDao extends HiverBaseDao<Goods, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.GoodsInStock; |
||||
|
|
||||
|
public interface GoodsInStockDao extends HiverBaseDao<GoodsInStock, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.GoodsStock; |
||||
|
|
||||
|
public interface GoodsStockDao extends HiverBaseDao<GoodsStock, String> { |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.Mall; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface MallDao extends HiverBaseDao<Mall, String> { |
||||
|
List<Mall> findAllByUserId(String userId); |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.PopularUrl; |
||||
|
|
||||
|
public interface PopularUrlDao extends HiverBaseDao<PopularUrl, String> { |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.PopularUrlGoods; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface PopularUrlGoodsDao extends HiverBaseDao<PopularUrlGoods, String> { |
||||
|
List<PopularUrlGoods> findAllByUrlId(String urlId); |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.RoleSetting; |
||||
|
|
||||
|
public interface RoleSettingDao extends HiverBaseDao<RoleSetting, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.ShoppingCart; |
||||
|
|
||||
|
public interface ShoppingCartDao extends HiverBaseDao<ShoppingCart, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.ShoppingCartGoods; |
||||
|
|
||||
|
public interface ShoppingCartGoodsDao extends HiverBaseDao<ShoppingCartGoods, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.UserClockIn; |
||||
|
|
||||
|
public interface UserClockInDao extends HiverBaseDao<UserClockIn, String> { |
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
package cc.hiver.shop.dao; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.entity.UserMall; |
||||
|
|
||||
|
public interface UserMallDao extends HiverBaseDao<UserMall, String> { |
||||
|
void deleteAllByMallId(String mallId); |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
package cc.hiver.shop.dto; |
||||
|
|
||||
|
import cc.hiver.core.common.annotation.Query; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
@Data |
||||
|
public class CustomAddressQueryCriteria implements Serializable { |
||||
|
@Query |
||||
|
private String userId; |
||||
|
|
||||
|
@Query(blurry = "consignee,receivingMobile,receivingCompany") |
||||
|
private String blurry; |
||||
|
} |
||||
@ -0,0 +1,24 @@ |
|||||
|
package cc.hiver.shop.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class GoodsAttributeDto { |
||||
|
@ApiModelProperty(value = "编号") |
||||
|
private String id; |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺id") |
||||
|
private String mallId; |
||||
|
|
||||
|
@ApiModelProperty(value = "分类id") |
||||
|
private String categoryId; |
||||
|
|
||||
|
@ApiModelProperty(value = "规格名称") |
||||
|
private String attributeKey; |
||||
|
|
||||
|
@ApiModelProperty(value = "规格值列表") |
||||
|
private List<String> attributeValues; |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package cc.hiver.shop.dto; |
||||
|
|
||||
|
import cc.hiver.shop.entity.PopularUrl; |
||||
|
import cc.hiver.shop.entity.PopularUrlGoods; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class PopularUrlDto { |
||||
|
@ApiModelProperty(value = "链接主表") |
||||
|
private PopularUrl url; |
||||
|
|
||||
|
@ApiModelProperty(value = "链接子表") |
||||
|
private List<PopularUrlGoods> goods; |
||||
|
} |
||||
@ -0,0 +1,20 @@ |
|||||
|
package cc.hiver.shop.dto; |
||||
|
|
||||
|
import cc.hiver.shop.entity.ShoppingCart; |
||||
|
import cc.hiver.shop.entity.ShoppingCartGoods; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 销售单 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class SalesSlipDto { |
||||
|
@ApiModelProperty(value = "购物车主表") |
||||
|
private ShoppingCart shoppingCart; |
||||
|
|
||||
|
@ApiModelProperty(value = "购物车列表") |
||||
|
List<ShoppingCartGoods> shoppingCartGoodsList; |
||||
|
} |
||||
@ -0,0 +1,50 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_address") |
||||
|
@TableName("t_address") |
||||
|
@ApiModel(value = "收获地址表") |
||||
|
public class Address extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货人") |
||||
|
private String consignee; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货电话") |
||||
|
private String receivingMobile; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货公司") |
||||
|
private String receivingCompany; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货区域") |
||||
|
private String receivingArea; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货地址") |
||||
|
private String address; |
||||
|
|
||||
|
@ApiModelProperty(value = "邮政编码") |
||||
|
private String zipCode; |
||||
|
|
||||
|
@ApiModelProperty(value = "会员id") |
||||
|
private String memberId; |
||||
|
|
||||
|
@ApiModelProperty(value = "默认地址") |
||||
|
private Integer defaultAddress; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货注释") |
||||
|
private String note; |
||||
|
} |
||||
@ -0,0 +1,50 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_custom_address") |
||||
|
@TableName("t_custom_address") |
||||
|
@ApiModel(value = "客户地址表") |
||||
|
public class CustomAddress extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货人") |
||||
|
private String consignee; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货电话") |
||||
|
private String receivingMobile; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货公司") |
||||
|
private String receivingCompany; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货区域") |
||||
|
private String receivingArea; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货地址") |
||||
|
private String address; |
||||
|
|
||||
|
@ApiModelProperty(value = "邮政编码") |
||||
|
private String zipCode; |
||||
|
|
||||
|
@ApiModelProperty(value = "用户id") |
||||
|
private String userId; |
||||
|
|
||||
|
@ApiModelProperty(value = "会员id 0表示未注册用户 1已注册用户对应id") |
||||
|
private String memberId; |
||||
|
|
||||
|
@ApiModelProperty(value = "客户简介") |
||||
|
private String intro; |
||||
|
} |
||||
@ -0,0 +1,77 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import cc.hiver.core.common.constant.ShopConstant; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Column; |
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_goods") |
||||
|
@TableName("t_goods") |
||||
|
@ApiModel(value = "商品表") |
||||
|
public class Goods extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品编号") |
||||
|
private String goodsNo; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品二维码") |
||||
|
private String goodsBarcode; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品名称") |
||||
|
private String goodsTitle; |
||||
|
|
||||
|
@ApiModelProperty(value = "分类id") |
||||
|
private String categoryId; |
||||
|
|
||||
|
@ApiModelProperty(value = "规格类型") |
||||
|
private Integer attributeType = ShopConstant.GOODS_ATTRIBUTE_COMMON; |
||||
|
|
||||
|
@ApiModelProperty(value = "规格列表") |
||||
|
private String attributeList; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品描述") |
||||
|
private String intro; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品详情") |
||||
|
private String detail; |
||||
|
|
||||
|
@ApiModelProperty(value = "库存") |
||||
|
private Integer stock = 0; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否启用 0上架 -1下架") |
||||
|
private Integer status = ShopConstant.GOODS_PUT_ON_SALE; |
||||
|
|
||||
|
@ApiModelProperty(value = "采购价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal purchasePrice = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "市场价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal price = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "批发价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal wholesalePrice = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺id") |
||||
|
private String mallId; |
||||
|
|
||||
|
@ApiModelProperty(value = "视频地址") |
||||
|
private String videoPath; |
||||
|
|
||||
|
@ApiModelProperty("办公区域") |
||||
|
private String region; |
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import cc.hiver.core.common.constant.CommonConstant; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Column; |
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_goods_attribute_key") |
||||
|
@TableName("t_goods_attribute_key") |
||||
|
@ApiModel(value = "商品规格主键表") |
||||
|
public class GoodsAttributeKey extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "分类id") |
||||
|
private String categoryId; |
||||
|
|
||||
|
@ApiModelProperty(value = "属性名") |
||||
|
private String attributeKey; |
||||
|
|
||||
|
@ApiModelProperty(value = "排序值") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal sortOrder; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否启用 0启用 -1禁用") |
||||
|
private Integer status = CommonConstant.STATUS_NORMAL; |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺id") |
||||
|
private String mallId; |
||||
|
|
||||
|
@ApiModelProperty("办公区域") |
||||
|
private String region; |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_goods_attribute_value") |
||||
|
@TableName("t_goods_attribute_value") |
||||
|
@ApiModel(value = "商品规格键值表") |
||||
|
public class GoodsAttributeValue extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "规格主键id") |
||||
|
private String attributeId; |
||||
|
|
||||
|
@ApiModelProperty(value = "规格值") |
||||
|
private String attributeValue; |
||||
|
} |
||||
@ -0,0 +1,56 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import cc.hiver.core.common.constant.CommonConstant; |
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Column; |
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
import javax.persistence.Transient; |
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_goods_category") |
||||
|
@TableName("t_goods_category") |
||||
|
@ApiModel(value = "商品分类表") |
||||
|
public class GoodsCategory extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "分类名称") |
||||
|
private String categoryName; |
||||
|
|
||||
|
@ApiModelProperty(value = "父id") |
||||
|
@Column(nullable = false) |
||||
|
private String parentId; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否为父节点(含子节点) 默认false") |
||||
|
private Boolean isParent = false; |
||||
|
|
||||
|
@ApiModelProperty(value = "排序值") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal sortOrder; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否启用 0启用 -1禁用") |
||||
|
private Integer status = CommonConstant.STATUS_NORMAL; |
||||
|
|
||||
|
@Transient |
||||
|
@TableField(exist = false) |
||||
|
@ApiModelProperty(value = "父节点名称") |
||||
|
private String parentTitle; |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺id") |
||||
|
private String mallId; |
||||
|
|
||||
|
@ApiModelProperty("办公区域") |
||||
|
private String region; |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_goods_in_stock") |
||||
|
@TableName("t_goods_in_stock") |
||||
|
@ApiModel(value = "商品入库表") |
||||
|
public class GoodsInStock extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "在库商品id") |
||||
|
private String goodsStockId; |
||||
|
|
||||
|
@ApiModelProperty(value = "入库数量") |
||||
|
private Integer num; |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺id") |
||||
|
private String mallId; |
||||
|
|
||||
|
@ApiModelProperty("办公区域") |
||||
|
private String region; |
||||
|
} |
||||
@ -0,0 +1,56 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import cc.hiver.core.common.constant.ShopConstant; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Column; |
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_goods_stock") |
||||
|
@TableName("t_goods_stock") |
||||
|
@ApiModel(value = "商品库存表") |
||||
|
public class GoodsStock extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品id") |
||||
|
private String goodsId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品规格") |
||||
|
private String goodsSpecs; |
||||
|
|
||||
|
@ApiModelProperty(value = "库存") |
||||
|
private Integer stock = 0; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否启用 0上架 -1下架") |
||||
|
private Integer status = ShopConstant.GOODS_PUT_ON_SALE; |
||||
|
|
||||
|
@ApiModelProperty(value = "采购价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal purchasePrice = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "市场价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal price = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "批发价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal wholesalePrice = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺id") |
||||
|
private String mallId; |
||||
|
|
||||
|
@ApiModelProperty("办公区域") |
||||
|
private String region; |
||||
|
} |
||||
@ -0,0 +1,48 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import cc.hiver.core.common.constant.CommonConstant; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Column; |
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_mall") |
||||
|
@TableName("t_mall") |
||||
|
@ApiModel(value = "商铺表") |
||||
|
public class Mall extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺名称") |
||||
|
private String title; |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺介绍") |
||||
|
private String intro; |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺图片") |
||||
|
private String img; |
||||
|
|
||||
|
@ApiModelProperty(value = "排序值") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal sortOrder; |
||||
|
|
||||
|
@ApiModelProperty(value = "是否启用 0启用 -1禁用") |
||||
|
private Integer status = CommonConstant.STATUS_NORMAL; |
||||
|
|
||||
|
@ApiModelProperty(value = "默认店铺") |
||||
|
private Integer defaultMall; |
||||
|
|
||||
|
@ApiModelProperty("办公区域") |
||||
|
private String region; |
||||
|
} |
||||
@ -0,0 +1,29 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_popular_url") |
||||
|
@TableName("t_popular_url") |
||||
|
@ApiModel(value = "热销推荐地址表") |
||||
|
public class PopularUrl extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "热销地址") |
||||
|
private String url; |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺id") |
||||
|
private String mallId; |
||||
|
} |
||||
@ -0,0 +1,46 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Column; |
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_popular_url_goods") |
||||
|
@TableName("t_popular_url_goods") |
||||
|
@ApiModel(value = "热销推荐地址对应商品表") |
||||
|
public class PopularUrlGoods extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "链接id") |
||||
|
private String urlId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺id") |
||||
|
private String mallId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品id") |
||||
|
private String goodsId; |
||||
|
|
||||
|
@ApiModelProperty(value = "采购价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal purchasePrice = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "市场价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal price = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "批发价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal wholesalePrice = new BigDecimal(0); |
||||
|
} |
||||
@ -0,0 +1,35 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_role_setting") |
||||
|
@TableName("t_role_setting") |
||||
|
@ApiModel(value = "角色配置表") |
||||
|
@NoArgsConstructor |
||||
|
public class RoleSetting extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "关联角色id") |
||||
|
private String roleId; |
||||
|
|
||||
|
@ApiModelProperty(value = "配置值value") |
||||
|
private String value; |
||||
|
|
||||
|
public RoleSetting(String id) { |
||||
|
super.setId(id); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,45 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_shopping_cart") |
||||
|
@TableName("t_shopping_cart") |
||||
|
@ApiModel(value = "购物车主表") |
||||
|
public class ShoppingCart extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "订单编号") |
||||
|
private String no; |
||||
|
|
||||
|
@ApiModelProperty(value = "下单人 0表示会员自己购买") |
||||
|
private String userId; |
||||
|
|
||||
|
@ApiModelProperty(value = "购买人 0表示用户购买") |
||||
|
private String memberId; |
||||
|
|
||||
|
@ApiModelProperty(value = "收货地址") |
||||
|
private String addressId; |
||||
|
|
||||
|
@ApiModelProperty(value = "总价") |
||||
|
private BigDecimal totalPrice = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺id") |
||||
|
private String mallId; |
||||
|
|
||||
|
@ApiModelProperty("办公区域") |
||||
|
private String region; |
||||
|
} |
||||
@ -0,0 +1,49 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Column; |
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_shopping_cart_goods") |
||||
|
@TableName("t_shopping_cart_goods") |
||||
|
@ApiModel(value = "购物车子表") |
||||
|
public class ShoppingCartGoods extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "购物车主表id") |
||||
|
private String cartId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品id") |
||||
|
private String goodsId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商品规格") |
||||
|
private String goodsSpecs; |
||||
|
|
||||
|
@ApiModelProperty(value = "采购价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal purchasePrice = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "市场价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal price = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "批发价") |
||||
|
@Column(precision = 10, scale = 2) |
||||
|
private BigDecimal wholesalePrice = new BigDecimal(0); |
||||
|
|
||||
|
@ApiModelProperty(value = "购买数量") |
||||
|
private Integer num; |
||||
|
} |
||||
@ -0,0 +1,51 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.SnowFlakeUtil; |
||||
|
import com.baomidou.mybatisplus.annotation.FieldFill; |
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
import org.springframework.data.annotation.CreatedBy; |
||||
|
import org.springframework.data.annotation.CreatedDate; |
||||
|
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
|
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Id; |
||||
|
import javax.persistence.Table; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_user_clock_in") |
||||
|
@TableName("t_user_clock_in") |
||||
|
@ApiModel(value = "用户打卡表") |
||||
|
public class UserClockIn { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@Id |
||||
|
@TableId |
||||
|
@ApiModelProperty(value = "唯一标识") |
||||
|
private String id = SnowFlakeUtil.nextId().toString(); |
||||
|
|
||||
|
@ApiModelProperty(value = "用户id") |
||||
|
private String userId; |
||||
|
|
||||
|
@ApiModelProperty(value = "打卡人") |
||||
|
@CreatedBy |
||||
|
@TableField(fill = FieldFill.INSERT) |
||||
|
private String clockInBy; |
||||
|
|
||||
|
@CreatedDate |
||||
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
|
@ApiModelProperty(value = "打卡时间") |
||||
|
private Date clockInTime; |
||||
|
} |
||||
@ -0,0 +1,31 @@ |
|||||
|
package cc.hiver.shop.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.experimental.Accessors; |
||||
|
import org.hibernate.annotations.DynamicInsert; |
||||
|
import org.hibernate.annotations.DynamicUpdate; |
||||
|
|
||||
|
import javax.persistence.Entity; |
||||
|
import javax.persistence.Table; |
||||
|
|
||||
|
@Data |
||||
|
@Accessors(chain = true) |
||||
|
@Entity |
||||
|
@DynamicInsert |
||||
|
@DynamicUpdate |
||||
|
@Table(name = "t_user_mall") |
||||
|
@TableName("t_user_mall") |
||||
|
@ApiModel(value = "用户管理商铺表") |
||||
|
public class UserMall extends HiverBaseEntity { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty(value = "用户id") |
||||
|
private String userId; |
||||
|
|
||||
|
@ApiModelProperty(value = "商铺id") |
||||
|
private String mallId; |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.Address; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface AddressService extends HiverBaseService<Address, String> { |
||||
|
List<Address> findAllByMemberId(String memberId); |
||||
|
} |
||||
@ -0,0 +1,11 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.CustomAddress; |
||||
|
import cc.hiver.shop.dto.CustomAddressQueryCriteria; |
||||
|
import org.springframework.data.domain.Page; |
||||
|
import org.springframework.data.domain.Pageable; |
||||
|
|
||||
|
public interface CustomAddressService extends HiverBaseService<CustomAddress, String> { |
||||
|
Page<CustomAddress> queryAll(CustomAddressQueryCriteria criteria, Pageable pageable); |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.GoodsAttributeKey; |
||||
|
|
||||
|
public interface GoodsAttributeKeyService extends HiverBaseService<GoodsAttributeKey, String> { |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.GoodsAttributeValue; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface GoodsAttributeValueService extends HiverBaseService<GoodsAttributeValue, String> { |
||||
|
List<GoodsAttributeValue> findAllBykAndAttributeId(String attributeId); |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.GoodsCategory; |
||||
|
|
||||
|
public interface GoodsCategoryService extends HiverBaseService<GoodsCategory, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.GoodsInStock; |
||||
|
|
||||
|
public interface GoodsInStockService extends HiverBaseService<GoodsInStock, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.Goods; |
||||
|
|
||||
|
public interface GoodsService extends HiverBaseService<Goods, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.GoodsStock; |
||||
|
|
||||
|
public interface GoodsStockService extends HiverBaseService<GoodsStock, String> { |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.Mall; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface MallService extends HiverBaseService<Mall, String> { |
||||
|
List<Mall> findAllByUserId(String userId); |
||||
|
} |
||||
@ -0,0 +1,10 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.PopularUrlGoods; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface PopularUrlGoodsService extends HiverBaseService<PopularUrlGoods, String> { |
||||
|
List<PopularUrlGoods> findAllByUrlId(String urlId); |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.PopularUrl; |
||||
|
|
||||
|
public interface PopularUrlService extends HiverBaseService<PopularUrl, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.RoleSetting; |
||||
|
|
||||
|
public interface RoleSettingService extends HiverBaseService<RoleSetting, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.ShoppingCartGoods; |
||||
|
|
||||
|
public interface ShoppingCartGoodsService extends HiverBaseService<ShoppingCartGoods, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.ShoppingCart; |
||||
|
|
||||
|
public interface ShoppingCartService extends HiverBaseService<ShoppingCart, String> { |
||||
|
} |
||||
@ -0,0 +1,7 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.UserClockIn; |
||||
|
|
||||
|
public interface UserClockInService extends HiverBaseService<UserClockIn, String> { |
||||
|
} |
||||
@ -0,0 +1,8 @@ |
|||||
|
package cc.hiver.shop.service; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseService; |
||||
|
import cc.hiver.shop.entity.UserMall; |
||||
|
|
||||
|
public interface UserMallService extends HiverBaseService<UserMall, String> { |
||||
|
void deleteAllByMallId(String mallId); |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.AddressDao; |
||||
|
import cc.hiver.shop.entity.Address; |
||||
|
import cc.hiver.shop.service.AddressService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class AddressServiceImpl implements AddressService { |
||||
|
@Autowired |
||||
|
private AddressDao addressDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<Address, String> getRepository() { |
||||
|
return addressDao; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<Address> findAllByMemberId(String memberId) { |
||||
|
return addressDao.findAllByMemberId(memberId); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,33 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.core.common.utils.QueryHelp; |
||||
|
import cc.hiver.shop.dao.CustomAddressDao; |
||||
|
import cc.hiver.shop.entity.CustomAddress; |
||||
|
import cc.hiver.shop.service.CustomAddressService; |
||||
|
import cc.hiver.shop.dto.CustomAddressQueryCriteria; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.data.domain.Page; |
||||
|
import org.springframework.data.domain.Pageable; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class CustomAddressServiceImpl implements CustomAddressService { |
||||
|
@Autowired |
||||
|
private CustomAddressDao customAddressDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<CustomAddress, String> getRepository() { |
||||
|
return customAddressDao; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Page<CustomAddress> queryAll(CustomAddressQueryCriteria criteria, Pageable pageable) { |
||||
|
Page<CustomAddress> list = customAddressDao.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder), pageable); |
||||
|
return list; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.GoodsAttributeKeyDao; |
||||
|
import cc.hiver.shop.entity.GoodsAttributeKey; |
||||
|
import cc.hiver.shop.service.GoodsAttributeKeyService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class GoodsAttributeKeyServiceImpl implements GoodsAttributeKeyService { |
||||
|
@Autowired |
||||
|
private GoodsAttributeKeyDao goodsAttributeKeyDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<GoodsAttributeKey, String> getRepository() { |
||||
|
return goodsAttributeKeyDao; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.GoodsAttributeValueDao; |
||||
|
import cc.hiver.shop.entity.GoodsAttributeValue; |
||||
|
import cc.hiver.shop.service.GoodsAttributeValueService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class GoodsAttributeValueServiceImpl implements GoodsAttributeValueService { |
||||
|
@Autowired |
||||
|
private GoodsAttributeValueDao goodsAttributeValueDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<GoodsAttributeValue, String> getRepository() { |
||||
|
return goodsAttributeValueDao; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<GoodsAttributeValue> findAllBykAndAttributeId(String attributeId) { |
||||
|
return goodsAttributeValueDao.findAllBykAndAttributeId(attributeId); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.GoodsCategoryDao; |
||||
|
import cc.hiver.shop.entity.GoodsCategory; |
||||
|
import cc.hiver.shop.service.GoodsCategoryService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class GoodsCategoryServiceImpl implements GoodsCategoryService { |
||||
|
@Autowired |
||||
|
private GoodsCategoryDao goodsCategoryDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<GoodsCategory, String> getRepository() { |
||||
|
return goodsCategoryDao; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.GoodsInStockDao; |
||||
|
import cc.hiver.shop.entity.GoodsInStock; |
||||
|
import cc.hiver.shop.service.GoodsInStockService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class GoodsInStockServiceImpl implements GoodsInStockService { |
||||
|
@Autowired |
||||
|
private GoodsInStockDao goodsInStockDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<GoodsInStock, String> getRepository() { |
||||
|
return goodsInStockDao; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.GoodsDao; |
||||
|
import cc.hiver.shop.entity.Goods; |
||||
|
import cc.hiver.shop.service.GoodsService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class GoodsServiceImpl implements GoodsService { |
||||
|
@Autowired |
||||
|
private GoodsDao goodsDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<Goods, String> getRepository() { |
||||
|
return goodsDao; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.GoodsStockDao; |
||||
|
import cc.hiver.shop.entity.GoodsStock; |
||||
|
import cc.hiver.shop.service.GoodsStockService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class GoodsStockServiceImpl implements GoodsStockService { |
||||
|
@Autowired |
||||
|
private GoodsStockDao goodsStockDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<GoodsStock, String> getRepository() { |
||||
|
return goodsStockDao; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.MallDao; |
||||
|
import cc.hiver.shop.entity.Mall; |
||||
|
import cc.hiver.shop.service.MallService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class MallServiceImpl implements MallService { |
||||
|
@Autowired |
||||
|
private MallDao mallDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<Mall, String> getRepository() { |
||||
|
return mallDao; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<Mall> findAllByUserId(String userId) { |
||||
|
return mallDao.findAllByUserId(userId); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.PopularUrlGoodsDao; |
||||
|
import cc.hiver.shop.entity.PopularUrlGoods; |
||||
|
import cc.hiver.shop.service.PopularUrlGoodsService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class PopularUrlGoodsServiceImpl implements PopularUrlGoodsService { |
||||
|
@Autowired |
||||
|
private PopularUrlGoodsDao popularUrlGoodsDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<PopularUrlGoods, String> getRepository() { |
||||
|
return popularUrlGoodsDao; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<PopularUrlGoods> findAllByUrlId(String urlId) { |
||||
|
return popularUrlGoodsDao.findAllByUrlId(urlId); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.PopularUrlDao; |
||||
|
import cc.hiver.shop.entity.PopularUrl; |
||||
|
import cc.hiver.shop.service.PopularUrlService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class PopularUrlServiceImpl implements PopularUrlService { |
||||
|
@Autowired |
||||
|
private PopularUrlDao popularUrlDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<PopularUrl, String> getRepository() { |
||||
|
return popularUrlDao; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.RoleSettingDao; |
||||
|
import cc.hiver.shop.entity.RoleSetting; |
||||
|
import cc.hiver.shop.service.RoleSettingService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class RoleSettingServiceImpl implements RoleSettingService { |
||||
|
@Autowired |
||||
|
private RoleSettingDao roleSettingDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<RoleSetting, String> getRepository() { |
||||
|
return roleSettingDao; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.ShoppingCartGoodsDao; |
||||
|
import cc.hiver.shop.entity.ShoppingCartGoods; |
||||
|
import cc.hiver.shop.service.ShoppingCartGoodsService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class ShoppingCartGoodsServiceImpl implements ShoppingCartGoodsService { |
||||
|
@Autowired |
||||
|
private ShoppingCartGoodsDao shoppingCartGoodsDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<ShoppingCartGoods, String> getRepository() { |
||||
|
return shoppingCartGoodsDao; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.ShoppingCartDao; |
||||
|
import cc.hiver.shop.entity.ShoppingCart; |
||||
|
import cc.hiver.shop.service.ShoppingCartService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class ShoppingCartServiceImpl implements ShoppingCartService { |
||||
|
@Autowired |
||||
|
private ShoppingCartDao shoppingCartDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<ShoppingCart, String> getRepository() { |
||||
|
return shoppingCartDao; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.UserClockInDao; |
||||
|
import cc.hiver.shop.entity.UserClockIn; |
||||
|
import cc.hiver.shop.service.UserClockInService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class UserClockInServiceImpl implements UserClockInService { |
||||
|
@Autowired |
||||
|
private UserClockInDao userClockInDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<UserClockIn, String> getRepository() { |
||||
|
return userClockInDao; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
package cc.hiver.shop.serviceimpl; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseDao; |
||||
|
import cc.hiver.shop.dao.UserMallDao; |
||||
|
import cc.hiver.shop.entity.UserMall; |
||||
|
import cc.hiver.shop.service.UserMallService; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Service |
||||
|
@Transactional |
||||
|
public class UserMallServiceImpl implements UserMallService { |
||||
|
@Autowired |
||||
|
private UserMallDao userMallDao; |
||||
|
|
||||
|
@Override |
||||
|
public HiverBaseDao<UserMall, String> getRepository() { |
||||
|
return userMallDao; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void deleteAllByMallId(String mallId) { |
||||
|
userMallDao.deleteAllByMallId(mallId); |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue