diff --git a/pom.xml b/pom.xml index 389d8cd..d9fd3f4 100644 --- a/pom.xml +++ b/pom.xml @@ -26,6 +26,11 @@ + + com.volcengine + volcengine-java-sdk-ark-runtime + LATEST + eu.bitwalker UserAgentUtils diff --git a/src/main/java/com/pixelai/api/chat/controller/VolcengineChatController.java b/src/main/java/com/pixelai/api/chat/controller/VolcengineChatController.java new file mode 100644 index 0000000..aa63311 --- /dev/null +++ b/src/main/java/com/pixelai/api/chat/controller/VolcengineChatController.java @@ -0,0 +1,31 @@ +package com.pixelai.api.chat.controller; + +import com.base.annotation.SysLog; +import com.base.helper.Result; +import com.pixelai.api.chat.service.VolcengineChatService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +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.Map; + +@Api(tags = "火山方舟api调用") +@RestController +@RequestMapping("/VolcengineChat") +public class VolcengineChatController { + @Autowired + private VolcengineChatService volcengineChatService; + + @SysLog(action = "VolcengineChat:generatePromptWords", value = "火山方舟在线推理:提示词生成") + @ApiOperation(value = "提示词生成", notes = "火山方舟在线推理") + @RequestMapping(value = "generatePromptWords", method = {RequestMethod.POST}) + public Result generatePromptWords(@RequestParam("message") String message) throws Exception { + Map response = volcengineChatService.generatePromptWords(message); + Object data = response.get("body"); + return new Result<>(true, data); + } +} diff --git a/src/main/java/com/pixelai/api/chat/service/VolcengineChatService.java b/src/main/java/com/pixelai/api/chat/service/VolcengineChatService.java new file mode 100644 index 0000000..665d1a7 --- /dev/null +++ b/src/main/java/com/pixelai/api/chat/service/VolcengineChatService.java @@ -0,0 +1,8 @@ +package com.pixelai.api.chat.service; + +import java.util.Map; + +public interface VolcengineChatService { + Map generatePromptWords(String message) throws Exception; + +} diff --git a/src/main/java/com/pixelai/api/chat/service/impl/VolcengineChatServiceImpl.java b/src/main/java/com/pixelai/api/chat/service/impl/VolcengineChatServiceImpl.java new file mode 100644 index 0000000..d754c1e --- /dev/null +++ b/src/main/java/com/pixelai/api/chat/service/impl/VolcengineChatServiceImpl.java @@ -0,0 +1,19 @@ +package com.pixelai.api.chat.service.impl; + +import com.pixelai.api.chat.service.VolcengineChatService; +import com.pixelai.api.chat.utils.VolcengineChatUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.Map; + +@Service +public class VolcengineChatServiceImpl implements VolcengineChatService { + @Autowired + VolcengineChatUtil volcengineChatUtil; + @Override + public Map generatePromptWords(String message) throws Exception { + Map response=volcengineChatUtil.doRequest(message); + return response; + } +} diff --git a/src/main/java/com/pixelai/api/chat/utils/VolcengineChatUtil.java b/src/main/java/com/pixelai/api/chat/utils/VolcengineChatUtil.java new file mode 100644 index 0000000..d5b7939 --- /dev/null +++ b/src/main/java/com/pixelai/api/chat/utils/VolcengineChatUtil.java @@ -0,0 +1,76 @@ +package com.pixelai.api.chat.utils; + +import com.volcengine.ark.runtime.model.completion.chat.ChatCompletionRequest; +import com.volcengine.ark.runtime.model.completion.chat.ChatMessage; +import com.volcengine.ark.runtime.model.completion.chat.ChatMessageRole; +import com.volcengine.ark.runtime.service.ArkService; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Component +public class VolcengineChatUtil { + + @Value("${volcengine.ArkApiKey}") + private String arkApiKey; + @Value("${volcengine.Model}") + private String model; + + + public Map doRequest(String message) { + // 创建ArkService实例 + ArkService arkService = ArkService.builder().apiKey(arkApiKey).build(); + + // 初始化消息列表 + List chatMessages = new ArrayList<>(); + ChatMessage userMessage; + // 创建用户消息 + if(message.length()>0){ + userMessage = ChatMessage.builder() + .role(ChatMessageRole.USER) // 设置消息角色为用户 + .content("请你丰富提示词,帮助用户更好的使用视觉大模型生成图片。文本要求两百字以内,格式要求不要换行,提示词如下:"+message) // 设置消息内容 + .build(); + }else { + userMessage = ChatMessage.builder() + .role(ChatMessageRole.USER) // 设置消息角色为用户 + .content("请你随机生成一张图片的提示词,帮助用户更方便的使用视觉大模型生成图片。文本要求两百字以内,格式要求不要换行。") // 设置消息内容 + .build(); + } + + // 将用户消息添加到消息列表 + chatMessages.add(userMessage); + + // 创建聊天完成请求 + ChatCompletionRequest chatCompletionRequest = ChatCompletionRequest.builder() + .model(model)// 需要替换为您的推理接入点ID + .messages(chatMessages) // 设置消息列表 + .build(); + Map response = new HashMap(); + // 发送聊天完成请求并打印响应 + try { + // 获取响应并打印每个选择的消息内容 +// arkService.createChatCompletion(chatCompletionRequest) +// .getChoices() +// .forEach(choice -> System.out.println(choice.getMessage().getContent())); + // 获取响应并存储每个选择的消息内容 + arkService.createChatCompletion(chatCompletionRequest) + .getChoices() + .forEach(choice -> response.put("body",choice.getMessage().getContent())); +// response.put("body",arkService.createChatCompletion(chatCompletionRequest) +// .getChoices()); +// System.out.println("\n\nbody:"+response.get("body")); + } catch (Exception e) { + response.put("body","请求失败: " + e.getMessage()); + System.out.println("请求失败: " + e.getMessage()); + } finally { + // 关闭服务执行器 + arkService.shutdownExecutor(); + } + return response; + } + +} diff --git a/src/main/java/com/pixelai/api/pa/controller/MbConsumptionController.java b/src/main/java/com/pixelai/api/pa/controller/MbConsumptionController.java deleted file mode 100644 index 14e4d74..0000000 --- a/src/main/java/com/pixelai/api/pa/controller/MbConsumptionController.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.pixelai.api.pa.controller; - -import org.springframework.web.bind.annotation.RequestMapping; -import com.base.annotation.SysLog; -import org.springframework.web.bind.annotation.RestController; -import com.base.helper.BaseController; -import com.base.helper.Result; -import com.pixelai.api.pa.entity.MbConsumption; -import com.pixelai.api.pa.service.MbConsumptionService; -import io.swagger.annotations.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.dao.DataIntegrityViolationException; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.*; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; - -import javax.validation.Valid; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -/** - *

- * 前端控制器 - *

- * - * @author gjj - * @since 2024-12-23 - */ -@Api(tags = "用户消费表") -@RestController -@RequestMapping("/mbConsumption") -public class MbConsumptionController extends BaseController { - - private static final Logger LOG = LoggerFactory.getLogger(MbConsumptionController.class); - @Autowired - private MbConsumptionService entityService; - - @SysLog(action = "findByPage", value = "分页查询用户消费") - @ApiOperation(value = "分页查询用户消费", notes = "分页查询用户消费") - @RequestMapping(method = RequestMethod.GET) - @ApiImplicitParams({@ApiImplicitParam(name = "size", value = "分页大小", paramType = "query"), - @ApiImplicitParam(name = "current", value = "当前页面:从1开始", paramType = "query")}) - public Result> findByPage(final MbConsumption example, final Page page) { - IPage records = entityService.page(example,page); - return new Result(true, records); - } - - @SysLog(action = "delete", value = "删除用户消费") - @ApiOperation(value = "删除用户消费") - @RequestMapping(value = "{id}", method = {RequestMethod.DELETE}) - @ApiImplicitParam(name = "id", value = "用户消费ID", required = true, paramType = "path") - public Result delete(@PathVariable final Integer id) { - try { - entityService.removeById(id); - return new Result(true, "成功删除用户消费", null); - } catch (DataIntegrityViolationException e) { - LOG.error("删除用户消费失败", e); - return new Result(false, "删除用户消费失败", "该用户消费不能删除,存在其他关联数据"); - } catch (Exception e) { - LOG.error("删除用户消费失败", e); - return new Result(false, "删除用户消费失败", e.getMessage()); - } - } - - @SysLog(action = "one", value = "查询单个用户消费") - @ApiOperation(value = "查询单个用户消费") - @RequestMapping(value = "{id}", method = {RequestMethod.GET}) - @ApiImplicitParam(name = "id", value = "用户消费ID", required = true, paramType = "path") - public Result one(@PathVariable final Integer id) { - try { - MbConsumption entity = entityService.getById(id); - return new Result(true, entity); - } catch (Exception e) { - LOG.error("查询单个用户消费失败", e); - return new Result(false, new MbConsumption()); - } - } - - @SysLog(action = "add", value = "添加用户消费") - @ApiOperation(value = "添加用户消费") - @RequestMapping(method = {RequestMethod.POST}) - public Result add(@Valid @RequestBody final MbConsumption entity, final BindingResult result) { - try { - if (result.hasErrors()) { - Map map = this.getErrors(result); - String errorMsg = map.entrySet().iterator().next().getValue(); - return new Result(false, "保存用户消费失败", errorMsg, map); - } else { - entityService.save(entity); - return new Result(true, "成功保存用户消费", null); - } - } catch (Exception e) { - LOG.error("添加用户消费失败", e); - return new Result(false, "保存用户消费失败", e.getMessage()); - } - } - - @SysLog(action = "update", value = "修改用户消费") - @ApiOperation(value = "修改用户消费") - @RequestMapping(method = {RequestMethod.PUT}) - public Result update(@Valid @RequestBody final MbConsumption entity, final BindingResult result) { - try { - if (result.hasErrors()) { - Map map = this.getErrors(result); - String errorMsg = map.entrySet().iterator().next().getValue(); - return new Result(false, "修改用户消费失败", errorMsg, map); - } else { - if (null == entity.getId()) { - throw new RuntimeException("id不能为空"); - } - entityService.updateById(entity); - return new Result(true, "成功修改用户消费", null); - } - } catch (Exception e) { - LOG.error("修改用户消费失败", e); - return new Result(false, "修改用户消费失败", e.getMessage()); - } - } - - @ApiOperation(value = "全部用户消费") - @RequestMapping(value = "all", method = RequestMethod.GET) - public Result> all(MbConsumption example) { - List entitys = entityService.list(example); - if (null != entitys) { - return new Result<>(true, entitys); - } - return new Result<>(true, Collections.emptyList()); - } - -} diff --git a/src/main/java/com/pixelai/api/pa/controller/PaPictureWallController.java b/src/main/java/com/pixelai/api/pa/controller/PaPictureWallController.java index 4fab877..a5488b3 100644 --- a/src/main/java/com/pixelai/api/pa/controller/PaPictureWallController.java +++ b/src/main/java/com/pixelai/api/pa/controller/PaPictureWallController.java @@ -1,9 +1,12 @@ package com.pixelai.api.pa.controller; import com.base.annotation.Unsecured; +import com.pixelai.api.component.entity.CpAttachment; import com.pixelai.api.component.entity.CpPhoto; import com.pixelai.api.pa.dao.PaPictureWallMapper; +import com.pixelai.api.pa.service.PaVipCurrencyService; import com.pixelai.api.pa.vo.PaPictureWallVo; +import com.pixelai.api.picture.vo.AiPictureVo; import com.pixelai.api.user.service.AcUserService; import org.springframework.web.bind.annotation.RequestMapping; import com.base.annotation.SysLog; @@ -48,6 +51,8 @@ public class PaPictureWallController extends BaseController { private AcUserService acUserService; @Autowired private PaPictureWallMapper paPictureWallMapper; + @Autowired + private PaVipCurrencyService paVipCurrencyService; @SysLog(action = "findByPage", value = "分页查询作品墙") @ApiOperation(value = "分页查询作品墙", notes = "分页查询作品墙") @@ -151,4 +156,26 @@ public class PaPictureWallController extends BaseController { return new Result<>(true, Collections.emptyList()); } + @SysLog(action = "PaPictureWall:geiOriginalPicture", value = "购买原图") + @ApiOperation(value = "购买原图",notes = "购买原图") + @RequestMapping(value="geiOriginalPicture",method = {RequestMethod.GET}) + public Result geiOriginalPicture(Integer id) { + Integer userId=acUserService.getUserId(); + if(userId==null){ + return new Result(false, "用户未登录"); + } + PaPictureWall paPictureWall=entityService.lambdaQuery() + .eq(PaPictureWall::getId,id) + .eq(PaPictureWall::getState,"t").one(); + if (paPictureWall ==null){ + return new Result(false, "作品不存在"); + } + //进行扣费 + Boolean state=paVipCurrencyService.consumeOriginalPicture(userId,paPictureWall); + if (state==false){ + return new Result(false, "余额不足"); + } + return new Result(true, paPictureWall); + } + } diff --git a/src/main/java/com/pixelai/api/pa/dao/MbConsumptionMapper.java b/src/main/java/com/pixelai/api/pa/dao/MbConsumptionMapper.java deleted file mode 100644 index 6b363fb..0000000 --- a/src/main/java/com/pixelai/api/pa/dao/MbConsumptionMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.pixelai.api.pa.dao; - -import com.pixelai.api.pa.entity.MbConsumption; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; - -/** - *

- * Mapper 接口 - *

- * - * @author gjj - * @since 2024-12-23 - */ -public interface MbConsumptionMapper extends BaseMapper { - -} diff --git a/src/main/java/com/pixelai/api/pa/entity/MbConsumption.java b/src/main/java/com/pixelai/api/pa/entity/MbConsumption.java deleted file mode 100644 index 16e5bd7..0000000 --- a/src/main/java/com/pixelai/api/pa/entity/MbConsumption.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.pixelai.api.pa.entity; - -import com.baomidou.mybatisplus.annotation.IdType; -import java.time.LocalDateTime; -import com.baomidou.mybatisplus.annotation.TableId; -import java.io.Serializable; -import java.util.Date; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.experimental.Accessors; - -/** - *

- * - *

- * - * @author gjj - * @since 2024-12-23 - */ -@Data -@EqualsAndHashCode(callSuper = false) -@Accessors(chain = true) -@ApiModel(value="MbConsumption", description="") -@NoArgsConstructor -@AllArgsConstructor -public class MbConsumption implements Serializable { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Integer id; - - @ApiModelProperty(value = "用户id") - private Integer userId; - - @ApiModelProperty(value = "货币id") - private Integer currencyId; - - @ApiModelProperty(value = "变动类型,充值/消费/") - private String type; - - @ApiModelProperty(value = "加减") - private String addOrSub; - - @ApiModelProperty(value = "数值") - private Integer value; - - @ApiModelProperty(value = "描述") - private String description; - - @ApiModelProperty(value = "创建时间") - private Date createtime; - - @ApiModelProperty(value = "状态") - private String state; - - public MbConsumption(Integer userId,String type,String addOrSub,Integer value,String description){ - this.userId=userId; - this.type=type; - this.addOrSub=addOrSub; - this.value=value; - this.description=description; - this.createtime=new Date(); - this.state="t"; - } -} diff --git a/src/main/java/com/pixelai/api/pa/entity/PaConsumption.java b/src/main/java/com/pixelai/api/pa/entity/PaConsumption.java index 5e91a7e..64fa323 100644 --- a/src/main/java/com/pixelai/api/pa/entity/PaConsumption.java +++ b/src/main/java/com/pixelai/api/pa/entity/PaConsumption.java @@ -16,7 +16,7 @@ import lombok.experimental.Accessors; /** *

- * + * *

* * @author gjj @@ -55,12 +55,26 @@ public class PaConsumption implements Serializable { @ApiModelProperty(value = "服务id") private Integer serviceId; - public PaConsumption(Integer userid,String addOrSub,Integer value,Integer serviceId){ + @ApiModelProperty(value = "描述") + private String description; + + public PaConsumption(Integer userid,String addOrSub,Integer value,Integer serviceId,String type,String description){ this.userid=userid; this.addOrSub=addOrSub; this.value=value; this.serviceId=serviceId; + this.type=type; this.createtime=new Date(); + this.description=description; + } + + public PaConsumption(Integer userid,String addOrSub,Integer value,String type,String description){ + this.userid=userid; + this.addOrSub=addOrSub; + this.value=value; + this.type=type; + this.createtime=new Date(); + this.description=description; } } diff --git a/src/main/java/com/pixelai/api/pa/entity/PaPictureWall.java b/src/main/java/com/pixelai/api/pa/entity/PaPictureWall.java index 9caa5a8..9ebc52b 100644 --- a/src/main/java/com/pixelai/api/pa/entity/PaPictureWall.java +++ b/src/main/java/com/pixelai/api/pa/entity/PaPictureWall.java @@ -62,5 +62,7 @@ public class PaPictureWall implements Serializable { @ApiModelProperty(value = "价格") private Integer price; - + public String consume(){ + return "您购买原图消费"+this.price+"钻石"; + } } diff --git a/src/main/java/com/pixelai/api/pa/service/MbConsumptionService.java b/src/main/java/com/pixelai/api/pa/service/MbConsumptionService.java index 5be28af..9686d7f 100644 --- a/src/main/java/com/pixelai/api/pa/service/MbConsumptionService.java +++ b/src/main/java/com/pixelai/api/pa/service/MbConsumptionService.java @@ -1,34 +1,34 @@ -package com.pixelai.api.pa.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.pixelai.api.pa.entity.MbConsumption; -import com.baomidou.mybatisplus.extension.service.IService; - -import java.util.List; - -/** - *

- * 服务类 - *

- * - * @author gjj - * @since 2024-12-23 - */ -public interface MbConsumptionService extends IService { - - /** - * 条件查询 - * @param example - * @return - */ - List list(MbConsumption example); - - /** - * 分页查询 - * @param example - * @param page - * @return - */ - IPage page(MbConsumption example,IPage page); - -} +//package com.pixelai.api.pa.service; +// +//import com.baomidou.mybatisplus.core.metadata.IPage; +//import com.pixelai.api.pa.entity.MbConsumption; +//import com.baomidou.mybatisplus.extension.service.IService; +// +//import java.util.List; +// +///** +// *

+// * 服务类 +// *

+// * +// * @author gjj +// * @since 2024-12-23 +// */ +//public interface MbConsumptionService extends IService { +// +// /** +// * 条件查询 +// * @param example +// * @return +// */ +// List list(MbConsumption example); +// +// /** +// * 分页查询 +// * @param example +// * @param page +// * @return +// */ +// IPage page(MbConsumption example,IPage page); +// +//} diff --git a/src/main/java/com/pixelai/api/pa/service/PaVipCurrencyService.java b/src/main/java/com/pixelai/api/pa/service/PaVipCurrencyService.java index af25e48..c166693 100644 --- a/src/main/java/com/pixelai/api/pa/service/PaVipCurrencyService.java +++ b/src/main/java/com/pixelai/api/pa/service/PaVipCurrencyService.java @@ -1,6 +1,7 @@ package com.pixelai.api.pa.service; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.pixelai.api.pa.entity.PaPictureWall; import com.pixelai.api.pa.entity.PaServices; import com.pixelai.api.pa.entity.PaVipCurrency; import com.baomidou.mybatisplus.extension.service.IService; @@ -17,10 +18,13 @@ import java.util.List; * @since 2024-12-04 */ public interface PaVipCurrencyService extends IService { - /** - * 为当前用户扣除钻石 - * @param money + * 当前用户购买原图扣除钻石 + * @return + */ + Boolean consumeOriginalPicture(Integer userId, PaPictureWall paPictureWall); + /** + * 当前用户使用AI接口扣除钻石 * @return */ Boolean consume(Integer userId, PaServices paServices); diff --git a/src/main/java/com/pixelai/api/pa/service/impl/MbConsumptionServiceImpl.java b/src/main/java/com/pixelai/api/pa/service/impl/MbConsumptionServiceImpl.java deleted file mode 100644 index 5513a0c..0000000 --- a/src/main/java/com/pixelai/api/pa/service/impl/MbConsumptionServiceImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.pixelai.api.pa.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.pixelai.api.pa.entity.MbConsumption; -import com.pixelai.api.pa.dao.MbConsumptionMapper; -import com.pixelai.api.pa.service.MbConsumptionService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.pixelai.api.user.entity.AcUser; -import com.pixelai.api.user.service.AcUserService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - *

- * 服务实现类 - *

- * - * @author gjj - * @since 2024-12-23 - */ -@Service -public class MbConsumptionServiceImpl extends ServiceImpl implements MbConsumptionService { - @Autowired - private AcUserService acUserService; - @Override - public List list(MbConsumption example) { - return this.list(buildWrapper(example)); - } - - @Override - public IPage page(MbConsumption example, IPage page) { - return this.page(page,buildWrapper(example)); - } - - /** - * 构建查询 - * - * @param example - * @return - */ - private QueryWrapper buildWrapper(MbConsumption example) { - QueryWrapper wrapper = new QueryWrapper<>(); - Integer userId=acUserService.getUserId(); - AcUser acuser=acUserService.getById(userId); - if (acuser.getAcgroup()!=1){ - wrapper.lambda().eq(MbConsumption::getUserId,userId); - } - wrapper.lambda().eq(MbConsumption::getState,"t"); - wrapper.orderByDesc("createtime"); - return wrapper; - } -} diff --git a/src/main/java/com/pixelai/api/pa/service/impl/PaVipCurrencyServiceImpl.java b/src/main/java/com/pixelai/api/pa/service/impl/PaVipCurrencyServiceImpl.java index 6e18b20..017e417 100644 --- a/src/main/java/com/pixelai/api/pa/service/impl/PaVipCurrencyServiceImpl.java +++ b/src/main/java/com/pixelai/api/pa/service/impl/PaVipCurrencyServiceImpl.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.base.context.Context; import com.base.context.ContextHolder; import com.pixelai.api.pa.entity.PaConsumption; +import com.pixelai.api.pa.entity.PaPictureWall; import com.pixelai.api.pa.entity.PaServices; import com.pixelai.api.pa.entity.PaVipCurrency; import com.pixelai.api.pa.dao.PaVipCurrencyMapper; @@ -44,7 +45,23 @@ public class PaVipCurrencyServiceImpl extends ServiceImpl impleme paVipLevel.setExperience(0); paVipLevel.setState("t"); paVipLevelService.save(paVipLevel); - //默认分配1000钻石 + //默认分配0钻石 PaVipCurrency paVipCurrency=new PaVipCurrency(); paVipCurrency.setUserid(user.getId()); - paVipCurrency.setNumerical(1000); + paVipCurrency.setNumerical(0);//默认分配0钻石 paVipCurrency.setState("t"); paVipCurrencyService.save(paVipCurrency); return new Result<>(true,"注册成功"); diff --git a/src/main/resources/application-prod.yml b/src/main/resources/application-prod.yml index 4b5f80f..bcfb67f 100644 --- a/src/main/resources/application-prod.yml +++ b/src/main/resources/application-prod.yml @@ -75,6 +75,8 @@ aliyun: # 火山引擎配置 volcengine: + ArkApiKey: 036e5187-8625-41cd-87e6-3325296582f1 + Model: ep-20250121122940-tbf2p AccessKeyID: AKLTZWYwOWQ4Y2VlZmViNGU4MWI3YzY5NWQ3NTVkNzFjNWU SecretAccessKey: WVdJeU9XTXlZVE00TXpka05HUmhabUU1TXpjME16RTJPRGsyWkRjM1pUZw== diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 0ef7c29..76591c6 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -85,6 +85,8 @@ aliyun: # 火山引擎配置 volcengine: + ArkApiKey: 036e5187-8625-41cd-87e6-3325296582f1 + Model: ep-20250121122940-tbf2p AccessKeyID: AKLTZWYwOWQ4Y2VlZmViNGU4MWI3YzY5NWQ3NTVkNzFjNWU SecretAccessKey: WVdJeU9XTXlZVE00TXpka05HUmhabUU1TXpjME16RTJPRGsyWkRjM1pUZw== diff --git a/src/main/resources/mapper/MbConsumptionMapper.xml b/src/main/resources/mapper/MbConsumptionMapper.xml deleted file mode 100644 index cf4424e..0000000 --- a/src/main/resources/mapper/MbConsumptionMapper.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - id, user_id, currency_id, type, add_or_sub, value, description, createtime, state - - - diff --git a/src/main/resources/mapper/PaPictureWallMapper.xml b/src/main/resources/mapper/PaPictureWallMapper.xml index b128333..314a279 100644 --- a/src/main/resources/mapper/PaPictureWallMapper.xml +++ b/src/main/resources/mapper/PaPictureWallMapper.xml @@ -33,7 +33,9 @@ upload_name, label_name, price, - service_name + service_name, + serviceId, + number from (select pa_picture_wall.id, pa_picture_wall.name, @@ -42,10 +44,12 @@ pa_picture_wall.size, pa_picture_wall.createtime, pa_picture_wall.state as state, + pa_picture_wall.number as number, ac_user.realname as upload_name, cp_label.name as label_name, pa_picture_wall.price as price, - pa_services.name as service_name + pa_services.name as service_name, + pa_services.id as serviceId from pa_picture_wall left join ac_user on pa_picture_wall.userid=ac_user.id left join cp_label on pa_picture_wall.cp_label_id =cp_label.id @@ -59,7 +63,7 @@ pa_picture_wall.id, pa_picture_wall.name, pa_picture_wall.watermark_path, - pa_picture_wall.original_path, +-- pa_picture_wall.original_path, pa_picture_wall.size, pa_picture_wall.createtime, pa_picture_wall.state as state,