| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.api.business; |
| | | |
| | | import com.doumee.api.BaseController; |
| | | import com.doumee.core.annotation.excel.ExcelExporter; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.ShopGoodsRelation; |
| | | import com.doumee.service.business.ShopGoodsRelationService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/12/15 09:39 |
| | | */ |
| | | @Api(tags = "ç»éåä¾è´§ä»·ä¿¡æ¯") |
| | | @RestController |
| | | @RequestMapping("/business/shopGoodsRelation") |
| | | public class ShopGoodsRelationController extends BaseController { |
| | | |
| | | @Autowired |
| | | private ShopGoodsRelationService shopGoodsRelationService; |
| | | |
| | | @PreventRepeat |
| | | @ApiOperation("æ°å»º") |
| | | @PostMapping("/create") |
| | | @RequiresPermissions("business:shopgoodsrelation:create") |
| | | public ApiResponse create(@RequestBody ShopGoodsRelation shopGoodsRelation) { |
| | | return ApiResponse.success(shopGoodsRelationService.create(shopGoodsRelation)); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDå é¤") |
| | | @GetMapping("/delete/{id}") |
| | | @RequiresPermissions("business:shopgoodsrelation:delete") |
| | | public ApiResponse deleteById(@PathVariable Integer id) { |
| | | shopGoodsRelationService.deleteById(id); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ¹éå é¤") |
| | | @GetMapping("/delete/batch") |
| | | @RequiresPermissions("business:shopgoodsrelation:delete") |
| | | public ApiResponse deleteByIdInBatch(@RequestParam String ids) { |
| | | String [] idArray = ids.split(","); |
| | | List<Integer> idList = new ArrayList<>(); |
| | | for (String id : idArray) { |
| | | idList.add(Integer.valueOf(id)); |
| | | } |
| | | shopGoodsRelationService.deleteByIdInBatch(idList); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDä¿®æ¹") |
| | | @PostMapping("/updateById") |
| | | @RequiresPermissions("business:shopgoodsrelation:update") |
| | | public ApiResponse updateById(@RequestBody ShopGoodsRelation shopGoodsRelation) { |
| | | shopGoodsRelationService.updateById(shopGoodsRelation); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢") |
| | | @PostMapping("/page") |
| | | @RequiresPermissions("business:shopgoodsrelation:query") |
| | | public ApiResponse<PageData<ShopGoodsRelation>> findPage (@RequestBody PageWrap<ShopGoodsRelation> pageWrap) { |
| | | return ApiResponse.success(shopGoodsRelationService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcel") |
| | | @RequiresPermissions("business:shopgoodsrelation:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<ShopGoodsRelation> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(ShopGoodsRelation.class).export(shopGoodsRelationService.findPage(pageWrap).getRecords(), "ç»éåä¾è´§ä»·ä¿¡æ¯", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:shopgoodsrelation:query") |
| | | public ApiResponse findById(@PathVariable Integer id) { |
| | | return ApiResponse.success(shopGoodsRelationService.findById(id)); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:shopgoodsrelation:create', 'æ°å»ºç»éåä¾è´§ä»·ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:shopgoodsrelation:delete', 'å é¤ç»éåä¾è´§ä»·ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:shopgoodsrelation:update', 'ä¿®æ¹ç»éåä¾è´§ä»·ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:shopgoodsrelation:query', 'æ¥è¯¢ç»éåä¾è´§ä»·ä¿¡æ¯', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | INSERT INTO `SYSTEM_PERMISSION`(`CODE`, `NAME`, `REMARK`, `FIXED`, `CREATE_USER`, `CREATE_TIME`, `UPDATE_USER`, `UPDATE_TIME`, `DELETED`) VALUES ('business:shopgoodsrelation:exportExcel', '导åºç»éåä¾è´§ä»·ä¿¡æ¯(Excel)', '', 0, 1, CURRENT_TIMESTAMP, NULL, NULL, 0); |
| | | |
| | |
| | | public enum OrderStatus{ |
| | | WAIT_PAY(0, "å¾
æ¯ä»", "å¾
æ¯ä»"), |
| | | PAY_DONE(1, "å¾
åè´§", "å·²æ¯ä»å¾
åè´§"), |
| | | WAIT_RECEIVE(2, "å¾
æ¶è´§", "å·²åè´§å¾
æ¶è´§"), |
| | | WAIT_RECEIVE(2, "å¾
æ¶è´§/å¾
èªæ", "å·²åè´§å¾
æ¶è´§/å¾
èªæ"), |
| | | DONE(3, "交æå®æ", "交æå®æ"), |
| | | CLOSE(4, "å·²å
³é", "å·²å
³é"), |
| | | PART_DONE(5, "é¨ååè´§", "é¨ååè´§"), |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.ShopGoodsRelation; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/12/15 09:39 |
| | | */ |
| | | public interface ShopGoodsRelationMapper extends BaseMapper<ShopGoodsRelation> { |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * ç»éåä¾è´§ä»·ä¿¡æ¯ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/12/15 09:39 |
| | | */ |
| | | @Data |
| | | @ApiModel("ç»éåä¾è´§ä»·ä¿¡æ¯") |
| | | @TableName("`shop_goods_relation`") |
| | | public class ShopGoodsRelation { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | @ExcelColumn(name="主é®") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "å建人ç¼ç ", example = "1") |
| | | @ExcelColumn(name="å建人ç¼ç ") |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | | @ExcelColumn(name="æ´æ°äººç¼ç ") |
| | | private Integer editor; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°æ¶é´") |
| | | @ExcelColumn(name="æ´æ°æ¶é´") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date editDate; |
| | | |
| | | @ApiModelProperty(value = "æ¯å¦å é¤0å¦ 1æ¯", example = "1") |
| | | @ExcelColumn(name="æ¯å¦å é¤0å¦ 1æ¯") |
| | | private Integer isdeleted; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | @ExcelColumn(name="夿³¨") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "忷䏻é®ï¼shop主é®ï¼", example = "1") |
| | | @ExcelColumn(name="忷䏻é®ï¼shop主é®ï¼") |
| | | private Integer shopId; |
| | | |
| | | @ApiModelProperty(value = "ååSKU IDï¼goods_sku主é®ï¼", example = "1") |
| | | @ExcelColumn(name="ååSKU IDï¼goods_sku主é®ï¼") |
| | | private Integer goodsSkuId; |
| | | |
| | | @ApiModelProperty(value = "ä¾è´§ä»·", example = "1") |
| | | @ExcelColumn(name="ä¾è´§ä»·") |
| | | private BigDecimal price; |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.ShopGoodsRelation; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç»éåä¾è´§ä»·ä¿¡æ¯Serviceå®ä¹ |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/12/15 09:39 |
| | | */ |
| | | public interface ShopGoodsRelationService { |
| | | |
| | | /** |
| | | * å建 |
| | | * |
| | | * @param shopGoodsRelation å®ä½å¯¹è±¡ |
| | | * @return Integer |
| | | */ |
| | | Integer create(ShopGoodsRelation shopGoodsRelation); |
| | | |
| | | /** |
| | | * 主é®å é¤ |
| | | * |
| | | * @param id ä¸»é® |
| | | */ |
| | | void deleteById(Integer id); |
| | | |
| | | /** |
| | | * å é¤ |
| | | * |
| | | * @param shopGoodsRelation å®ä½å¯¹è±¡ |
| | | */ |
| | | void delete(ShopGoodsRelation shopGoodsRelation); |
| | | |
| | | /** |
| | | * æ¹é主é®å é¤ |
| | | * |
| | | * @param ids 主é®é |
| | | */ |
| | | void deleteByIdInBatch(List<Integer> ids); |
| | | |
| | | /** |
| | | * 䏻鮿´æ° |
| | | * |
| | | * @param shopGoodsRelation å®ä½å¯¹è±¡ |
| | | */ |
| | | void updateById(ShopGoodsRelation shopGoodsRelation); |
| | | |
| | | /** |
| | | * æ¹é䏻鮿´æ° |
| | | * |
| | | * @param shopGoodsRelations å®ä½é |
| | | */ |
| | | void updateByIdInBatch(List<ShopGoodsRelation> shopGoodsRelations); |
| | | |
| | | /** |
| | | * 䏻鮿¥è¯¢ |
| | | * |
| | | * @param id ä¸»é® |
| | | * @return ShopGoodsRelation |
| | | */ |
| | | ShopGoodsRelation findById(Integer id); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | | * @param shopGoodsRelation å®ä½å¯¹è±¡ |
| | | * @return ShopGoodsRelation |
| | | */ |
| | | ShopGoodsRelation findOne(ShopGoodsRelation shopGoodsRelation); |
| | | |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢ |
| | | * |
| | | * @param shopGoodsRelation å®ä½å¯¹è±¡ |
| | | * @return List<ShopGoodsRelation> |
| | | */ |
| | | List<ShopGoodsRelation> findList(ShopGoodsRelation shopGoodsRelation); |
| | | |
| | | /** |
| | | * å页æ¥è¯¢ |
| | | * |
| | | * @param pageWrap å页对象 |
| | | * @return PageData<ShopGoodsRelation> |
| | | */ |
| | | PageData<ShopGoodsRelation> findPage(PageWrap<ShopGoodsRelation> pageWrap); |
| | | |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | | * @param shopGoodsRelation å®ä½å¯¹è±¡ |
| | | * @return long |
| | | */ |
| | | long count(ShopGoodsRelation shopGoodsRelation); |
| | | } |
| | |
| | | if(Objects.isNull(shop)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"è¯·éæ©æ£ç¡®çèªæé¨åºï¼"); |
| | | } |
| | | //夿é¨åºæ¯å¦è®¾ç½®ååçä»·æ ¼ä¿¡æ¯ |
| | | |
| | | |
| | | //æ ¹æ®éæ©åæ·è¿è¡ä¼åä¸åæ·ä¿¡æ¯ç»å® |
| | | if(Objects.isNull(member.getBindShopId())){ |
| | | memberMapper.update(new UpdateWrapper<Member>().lambda() |
| | | .set(Member::getBindShopId,shop.getId()) |
| | | .eq(Member::getId,member.getId()) |
| | | ); |
| | | } |
| | | |
| | | goodsorder.setPickUpShopId(shop.getId()); |
| | | goodsorder.setDistributionShopId(shop.getId()); |
| | | if(Objects.isNull(member.getBindShopId())){ |
| | |
| | | Object response = null; |
| | | WxPayUnifiedOrderRequest request = new WxPayUnifiedOrderRequest(); |
| | | request.setBody("å¹³å°åå"); |
| | | request.setAttach("terraceMall"); |
| | | request.setAttach("shopGoods"); |
| | | request.setOutTradeNo(goodsorder.getCode().toString()); |
| | | request.setTotalFee(BaseWxPayRequest.yuanToFen(goodsorder.getPrice().toString())); |
| | | // request.setTotalFee(2); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.ShopGoodsRelationMapper; |
| | | import com.doumee.dao.business.model.ShopGoodsRelation; |
| | | import com.doumee.service.business.ShopGoodsRelationService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç»éåä¾è´§ä»·ä¿¡æ¯Serviceå®ç° |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/12/15 09:39 |
| | | */ |
| | | @Service |
| | | public class ShopGoodsRelationServiceImpl implements ShopGoodsRelationService { |
| | | |
| | | @Autowired |
| | | private ShopGoodsRelationMapper shopGoodsRelationMapper; |
| | | |
| | | @Override |
| | | public Integer create(ShopGoodsRelation shopGoodsRelation) { |
| | | shopGoodsRelationMapper.insert(shopGoodsRelation); |
| | | return shopGoodsRelation.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteById(Integer id) { |
| | | shopGoodsRelationMapper.deleteById(id); |
| | | } |
| | | |
| | | @Override |
| | | public void delete(ShopGoodsRelation shopGoodsRelation) { |
| | | UpdateWrapper<ShopGoodsRelation> deleteWrapper = new UpdateWrapper<>(shopGoodsRelation); |
| | | shopGoodsRelationMapper.delete(deleteWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteByIdInBatch(List<Integer> ids) { |
| | | if (CollectionUtils.isEmpty(ids)) { |
| | | return; |
| | | } |
| | | shopGoodsRelationMapper.deleteBatchIds(ids); |
| | | } |
| | | |
| | | @Override |
| | | public void updateById(ShopGoodsRelation shopGoodsRelation) { |
| | | shopGoodsRelationMapper.updateById(shopGoodsRelation); |
| | | } |
| | | |
| | | @Override |
| | | public void updateByIdInBatch(List<ShopGoodsRelation> shopGoodsRelations) { |
| | | if (CollectionUtils.isEmpty(shopGoodsRelations)) { |
| | | return; |
| | | } |
| | | for (ShopGoodsRelation shopGoodsRelation: shopGoodsRelations) { |
| | | this.updateById(shopGoodsRelation); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ShopGoodsRelation findById(Integer id) { |
| | | return shopGoodsRelationMapper.selectById(id); |
| | | } |
| | | |
| | | @Override |
| | | public ShopGoodsRelation findOne(ShopGoodsRelation shopGoodsRelation) { |
| | | QueryWrapper<ShopGoodsRelation> wrapper = new QueryWrapper<>(shopGoodsRelation); |
| | | return shopGoodsRelationMapper.selectOne(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public List<ShopGoodsRelation> findList(ShopGoodsRelation shopGoodsRelation) { |
| | | QueryWrapper<ShopGoodsRelation> wrapper = new QueryWrapper<>(shopGoodsRelation); |
| | | return shopGoodsRelationMapper.selectList(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public PageData<ShopGoodsRelation> findPage(PageWrap<ShopGoodsRelation> pageWrap) { |
| | | IPage<ShopGoodsRelation> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | QueryWrapper<ShopGoodsRelation> queryWrapper = new QueryWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | if (pageWrap.getModel().getId() != null) { |
| | | queryWrapper.lambda().eq(ShopGoodsRelation::getId, pageWrap.getModel().getId()); |
| | | } |
| | | if (pageWrap.getModel().getCreator() != null) { |
| | | queryWrapper.lambda().eq(ShopGoodsRelation::getCreator, pageWrap.getModel().getCreator()); |
| | | } |
| | | if (pageWrap.getModel().getCreateDate() != null) { |
| | | queryWrapper.lambda().ge(ShopGoodsRelation::getCreateDate, Utils.Date.getStart(pageWrap.getModel().getCreateDate())); |
| | | queryWrapper.lambda().le(ShopGoodsRelation::getCreateDate, Utils.Date.getEnd(pageWrap.getModel().getCreateDate())); |
| | | } |
| | | if (pageWrap.getModel().getEditor() != null) { |
| | | queryWrapper.lambda().eq(ShopGoodsRelation::getEditor, pageWrap.getModel().getEditor()); |
| | | } |
| | | if (pageWrap.getModel().getEditDate() != null) { |
| | | queryWrapper.lambda().ge(ShopGoodsRelation::getEditDate, Utils.Date.getStart(pageWrap.getModel().getEditDate())); |
| | | queryWrapper.lambda().le(ShopGoodsRelation::getEditDate, Utils.Date.getEnd(pageWrap.getModel().getEditDate())); |
| | | } |
| | | if (pageWrap.getModel().getIsdeleted() != null) { |
| | | queryWrapper.lambda().eq(ShopGoodsRelation::getIsdeleted, pageWrap.getModel().getIsdeleted()); |
| | | } |
| | | if (pageWrap.getModel().getRemark() != null) { |
| | | queryWrapper.lambda().eq(ShopGoodsRelation::getRemark, pageWrap.getModel().getRemark()); |
| | | } |
| | | if (pageWrap.getModel().getShopId() != null) { |
| | | queryWrapper.lambda().eq(ShopGoodsRelation::getShopId, pageWrap.getModel().getShopId()); |
| | | } |
| | | if (pageWrap.getModel().getGoodsSkuId() != null) { |
| | | queryWrapper.lambda().eq(ShopGoodsRelation::getGoodsSkuId, pageWrap.getModel().getGoodsSkuId()); |
| | | } |
| | | if (pageWrap.getModel().getPrice() != null) { |
| | | queryWrapper.lambda().eq(ShopGoodsRelation::getPrice, pageWrap.getModel().getPrice()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | return PageData.from(shopGoodsRelationMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | @Override |
| | | public long count(ShopGoodsRelation shopGoodsRelation) { |
| | | QueryWrapper<ShopGoodsRelation> wrapper = new QueryWrapper<>(shopGoodsRelation); |
| | | return shopGoodsRelationMapper.selectCount(wrapper); |
| | | } |
| | | } |
| | |
| | | fundService.create(fund); |
| | | break; |
| | | } |
| | | case "shopGoods": { |
| | | Goodsorder DBGoodsOrder = new Goodsorder(); |
| | | DBGoodsOrder.setCode(Long.valueOf(outTradeNo)); |
| | | Goodsorder goodsOrder = goodsorderService.findOne(DBGoodsOrder); |
| | | if(Objects.isNull(goodsOrder)){ |
| | | return WxPayNotifyResponse.fail( "æ¯ä»åè°ä¿¡æ¯("+ wxId + ") = > æªæ¥è¯¢å°æ¯ä»å¯¹è±¡ä¿¡æ¯!"); |
| | | } |
| | | if(goodsOrder.getStatus().equals(Constants.ONE)){ |
| | | return WxPayNotifyResponse.success("å¤çæå!"); |
| | | } |
| | | goodsOrder.setPayStatus(Constants.ONE); |
| | | goodsOrder.setPayDate(new Date()); |
| | | goodsOrder.setPayOrderId(paymentNo); |
| | | goodsOrder.setStatus(Constants.equalsInteger(goodsOrder.getReceiveType(),Constants.ZERO)?Constants.OrderStatus.PAY_DONE.getKey():Constants.OrderStatus.WAIT_RECEIVE.getKey()); |
| | | goodsOrder.setPayMethod(Constants.ZERO); |
| | | goodsorderService.updateById(goodsOrder); |
| | | Fund fund = new Fund(); |
| | | fund.setOrderCode(goodsOrder.getPayOrderId()); |
| | | fund.setCreator(goodsOrder.getMemberId()); |
| | | fund.setCreateDate(new Date()); |
| | | fund.setIsdeleted(Constants.ZERO); |
| | | fund.setRemark(goodsOrder.getCode().toString()); |
| | | fund.setMemberId(goodsOrder.getMemberId()); |
| | | fund.setTitle("è®¢åæ¯ä»"); |
| | | fund.setContent("è®¢åæ¯ä»"); |
| | | fund.setObjId(goodsOrder.getId()); |
| | | fund.setObjType(Constants.ONE); |
| | | fund.setType(Constants.ZERO); |
| | | fund.setNum(goodsOrder.getPrice()); |
| | | fundService.create(fund); |
| | | break; |
| | | } |
| | | |
| | | } |
| | | return WxPayNotifyResponse.success("å¤çæå!"); |
| | | } |